ubuntu 16.04 数据库mysql安装与管理
2024-09-04 14:48:06
1.安装mysql的客户端与服务器端
$>sudo apt-get install mysql-server mysql-client
2.管理服务
1.启动
$>sudo service mysql start
2.停止
$>sudo service mysql stop
3.重启
$>sudo service mysql restart
3.配置允许远程连接
1.找到mysql配置文件并修改
$>sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
# bind-address=127.0.0.1 # 注释本行
2.登录mysql,运行如下命令
# 给root用户授予在任意主机(%)访问任意数据库的所有权限
# grant all privileges on *.* to 'root'@'%' identified by '密码' with grant option;
mysql>grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option; # 我的密码是root
mysql>flush privileges;
3.重启mysql
$>sudo service mysql restart
最新文章
- 用django创建一个项目
- web标准之道——笔记
- 云计算CTO工作的具体内容(挺详细)
- C# DateTime 格式化 奇怪问题!
- A除以B问题
- 仿写自己的一个加载语言包的L函数
- sql sever怎样替换把表中数据。
- 读Zepto源码之fx_methods模块
- Spring Cloud 2-RabbitMQ 集成(八)
- 经测试稳定可用的蓝牙链接通信Demo,记录过程中遇到的问题的思考和解决办法,并整理后给出一个Utils类可以简单调用来实现蓝牙功能
- js 字符串截取函数substr,substring,slice之间的差异
- [转] XEN, KVM, Libvirt and IPTables
- javaScript遍历对象、数组总结
- 『编程题全队』Beta 阶段冲刺博客一
- sqli-labs学习笔记 DAY5
- 【RF库Collections测试】Copy Dictionary
- 【CF1157F】Maximum Balanced Circle 求一个相邻元素之间绝对值为小于1的最大环
- Linux环境下c语言静态链接库和动态链接库创建和使用
- java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' 异常处理,及MySQL数据库编码设置
- shell中的常用通配符,字符类
热门文章
- Douglas-Peucker 轨迹压缩算法
- bzoj 4519: [Cqoi2016]不同的最小割【最小割树Gomory–Hu tree】
- nginx 配置tp3.2
- PowerDesigner在PDM转换为sql脚本时报错Generation aborted due to errors detected during the verification of the mod
- ACM_给你100块钱
- jmeter(十二)处理Cookie与Session
- Java_JDBC连接数据库_使用读取配置文件的方式
- Wamp搭建的服务器登录的时候出现Access denied for user 'hello'@'localhost' (using password: YES)
- 微信小程序组件解读和分析:七、button按钮
- Fragment懒加载预加载