mysql 远程连接有问问题,无法连接
Posted httpssl
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql 远程连接有问问题,无法连接相关的知识,希望对你有一定的参考价值。
0X01:
[email protected]:~# mysql -h 192.168.7.106 -u root
ERROR 1045 (28000): Access denied for user ‘root‘@‘192.168.7.108‘ (using password: NO)
0X02(解决方法):
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘root‘ WITH GRANT OPTION;
0X03:查看
MySQL [mysql]> select user,host from user;
+------------------+----------------+
| user | host |
+------------------+----------------+
| root | % |
| root | 127.0.0.1 |
| | localhost |
| debian-sys-maint | localhost |
| root | localhost |
| | ubuntu804-base |
| root | ubuntu804-base |
+------------------+----------------+
7 rows in set (0.00 sec)
以上是关于mysql 远程连接有问问题,无法连接的主要内容,如果未能解决你的问题,请参考以下文章