美文网首页
远程连接ubuntu的mysql数据库不能连上

远程连接ubuntu的mysql数据库不能连上

作者: Mr_Laoyu | 来源:发表于2017-07-21 09:22 被阅读0次

mysql是apt-get安装的
1.给账户连接的权限

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
flush privileges;

2.在mysqld.cnf找到bind-address = 127.0.0.1,加个#号注释掉
配置文件路径 /etc/mysql/mysql.conf.d/mysqld.cnf

#bind-address = 127.0.0.1

3.重启服务器

sudo service mysql restart

相关文章

网友评论

      本文标题:远程连接ubuntu的mysql数据库不能连上

      本文链接:https://www.haomeiwen.com/subject/ecpskxtx.html