当前位置:Gxlcms > 数据库问题 > Linux Ubuntu MySQL remote access 远程连接配置

Linux Ubuntu MySQL remote access 远程连接配置

时间:2021-07-01 10:21:17 帮助过:30人阅读

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

 

Linux Ubuntu MySQL remote access 远程连接配置

标签:my.cnf   lease   option   add   err   roo   instead   bsp   style   

人气教程排行