ubuntu下远程连接数据库

2018-08-16  本文已影响0人  源猿袁

sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install libmysqlclient-dev

service mysql start

ps -aux | grep mysql
netstat -ntlp | grep 3306

vim /etc/mysql/mysql.conf.d/mysqld.cnf

bind-address 127.0.0.1 改为 0.0.0.0
service mysql restart

mysql -u root -p

mysql> grant all on . to 'root'@'%' identified by '123456' with grant option;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

windows 上面 就可以使用 navicat 连接 远程数据库

上一篇下一篇

猜你喜欢

热点阅读