1. 程式人生 > >navicat異常 - 1130-host ... is not allowed to connect to this MySql server

navicat異常 - 1130-host ... is not allowed to connect to this MySql server

錯誤描述

用navicat連線資料庫報錯:1130-host ... is not allowed to connect to this MySql server如何處理

 

解決方案

 

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;