解决报错:错误1130- Host xxx is not allowed to connect to this MariaDb server
生活随笔
收集整理的這篇文章主要介紹了
解决报错:错误1130- Host xxx is not allowed to connect to this MariaDb server
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
這個問題是因為在數據庫服務器中的mysql數據庫中的user的表中沒有權限(也可以說沒有用戶),下面將記錄我遇到問題的過程及解決的方法。
在搭建完LNMP環境后用Navicate連接出錯
遇到這個問題首先到mysql所在的服務器上用連接進行處理
1、連接服務器: mysql -u root -p
2、看當前所有數據庫:show databases;
3、進入mysql數據庫:use mysql;
4、查看mysql數據庫中所有的表:show tables;
5、查看user表中的數據: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
總結
以上是生活随笔為你收集整理的解决报错:错误1130- Host xxx is not allowed to connect to this MariaDb server的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【C++ Primer】自己动手编写函数
- 下一篇: 北斗部标808协议解析说明示例