MySQL8 118.199.22.193 is not allowed to connect to

遇到这个问题不要着急,基本上是用第三方工具访问不到,其原因是我们的用户名localhost原因

1、cd mysql目录

2、mysql -u root -p

3、use mysql 

4、show databases;

5、select host from user;

6、update user set host ='%' where user ='root';

7、flush privileges;

8、quit 

以上几个步骤即可解决

Guess you like

Origin blog.csdn.net/guochengabcd/article/details/103627923