解决报错:错误1130- Host xxx is not allowed to connect to this MariaDb server
這個問題是因為在數(shù)據(jù)庫服務(wù)器中的mysql數(shù)據(jù)庫中的user的表中沒有權(quán)限(也可以說沒有用戶),下面將記錄我遇到問題的過程及解決的方法。
在搭建完LNMP環(huán)境后用Navicate連接出錯
遇到這個問題首先到mysql所在的服務(wù)器上用連接進(jìn)行處理
1、連接服務(wù)器: mysql -u root -p
2、看當(dāng)前所有數(shù)據(jù)庫:show databases;
3、進(jìn)入mysql數(shù)據(jù)庫:use mysql;
4、查看mysql數(shù)據(jù)庫中所有的表:show tables;
5、查看user表中的數(shù)據(jù):select Host, User,Password from user;
6、修改user表中的Host:update user set Host='%' where User='root';
7、最后刷新一下:flush privileges;
#一定要記得在寫sql的時候要在語句完成后加上" ; "下面是圖示說明
?
https://blog.csdn.net/dabao87/article/details/80571877
https://blog.csdn.net/qq_35396905/article/details/82972618
總結(jié)
以上是生活随笔為你收集整理的解决报错:错误1130- Host xxx is not allowed to connect to this MariaDb server的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【C++ Primer】自己动手编写函数
- 下一篇: Windows下安装MySQL压缩zip