Linux Ubuntu MySQL remote access 远程连接配置
发布日期:2021-08-13 04:05:34 浏览次数:50 分类:技术文章

本文共 804 字,大约阅读时间需要 2 分钟。

For security consideration, mySQL does NOT allow remote access by default. 

You might see err: Can't connect to MySQL server on 'xx.xx.xx.xx'(10061)

Please check below configurations:

==========================

1. Listen to remote servers

vi /etc/mysql/my.cnf

# Instead of skip-networking the default is now to listen only on  

# localhost which is more compatible and is not less secure.  

bind-address = 127.0.0.1

comment out above line, or change to your remote server IP.

==========================

2. Create an account for remote access. (by default root account can only be used locally.)

# mysql -u root -proot 

mysql>GRANT ALL PRIVILEGES ON *.* TO 'sa'@'%' IDENTIFIED BY 'youpassword' WITH GRANT OPTION;

mysql>flush privileges;

# service mysql restart

 

转载于:https://www.cnblogs.com/anbosun/p/6010024.html

转载地址:https://blog.csdn.net/weixin_30675247/article/details/98985768 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:selenium+python-unittest多线程生成报告(转)
下一篇:条件锁详解

发表评论

最新留言

第一次来,支持一个
[***.219.124.196]2024年03月01日 10时36分22秒