当前位置:网站首页>Error 1130- host XXX is not allowed to connect to this MariaDB server

Error 1130- host XXX is not allowed to connect to this MariaDB server

2022-06-09 03:37:00 51CTO

This problem is due to the mysql In the database user There are no permissions in the table ( It can also be said that there are no users ), The following will record the process of my problems and solutions .

   After building up LNMP After the environment Navicate link error

   Encounter this problem first to mysql Use the connection to process on the server

  1、 Connect to server : mysql -u root -p

  2、 Look at all current databases :show databases;

  3、 Get into mysql database :use mysql;

  4、 see mysql All the tables in the database :show tables;

  5、 see user Table data :select Host, User,Password from user;

  6、 modify user In the table Host:update user set Host='%' where User='root';

  7、 Last refresh :flush privileges;

# Be sure to remember to write sql Add... After the statement is completed " ; " The following is an illustration

 


原网站

版权声明
本文为[51CTO]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206090333480292.html