centos下 mysql远程连接 配置
作者:高景洋 日期:2020-10-17 17:42:29 浏览次数:804
1、在控制台执行
mysql -u root -p
系统提示输入数据库 root 用户的密码,输入完成后即进入 mysql 控制台
2、选择数据库
use mysql;
开启远程连接
执行以下两个脚本:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
3、重起 MySQL 服务
service mysqld restart
4、如果执行完以上步骤,还是不能远程连接,那么我们需要查看服务器的防火墙是否开启
service iptables status;
service iptables stop;
mysql -u root -p
系统提示输入数据库 root 用户的密码,输入完成后即进入 mysql 控制台
2、选择数据库
use mysql;
开启远程连接
执行以下两个脚本:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
3、重起 MySQL 服务
service mysqld restart
4、如果执行完以上步骤,还是不能远程连接,那么我们需要查看服务器的防火墙是否开启
service iptables status;
service iptables stop;
本文永久性链接:
<a href="http://r4.com.cn/art144.aspx">centos下 mysql远程连接 配置</a>
<a href="http://r4.com.cn/art144.aspx">centos下 mysql远程连接 配置</a>
相关文章
- 安装mysql报错:repository are already installed but they are not correct for this package.
- mysql错误 IP address 'xxxx' could not be resolved: Name or service not known
- mysql设置赋予远程服务器链接的权限
- mysql常用命令汇总
- linux下远程连接mysql
- centos下 mysql远程连接 配置
- Centos下 mysql安装教程
- Mysql 随笔
- mysql update报错 this is incompatible with sql_mode=only_full_group_by