标签:end bind row 远程 ubuntu grant ubunt ide roo
lichengbei
2019-12-21
安装server
root@ubuntu1804:~# apt install mysql-server
安装client
root@ubuntu1804:~# apt install mysql-client
设置root密码并配置远程权限
root@ubuntu1804:~# mysql -u root -p
Enter password:{enter}
Welcome to the MySQL monitor. Commands end with ; or \g.
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘1234.qwer‘ WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> COMMIT;
Query OK, 0 rows affected (0.00 sec)
mysql> QUIT
Bye
修改配置文件使可远程登录并重启mysql服务
root@ubuntu1804:~# vim /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 0.0.0.0
root@ubuntu1804:~# service mysql restart
Navicat登录验证
标签:end bind row 远程 ubuntu grant ubunt ide roo
原文地址:https://www.cnblogs.com/lichengbei/p/12079059.html