Linux Mysql 1130錯誤解決
今天在win32下通過navicat 遠程登錄Mysql時出現如下錯誤:
想都不用想,肯定是Mysql的訪問權限問題。
首先,通過終端(我用的是SSH)遠程登錄到Linux服務器,為了安全起見,先改一下Mysql數據的root用戶密碼:
[plain] [hadoop@h1 ~]$ mysqladmin -u root password 123456 [hadoop@h1 ~]$ mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 13 Server version: 5.0.77 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>第二步,查詢Mysql中所有用戶的權限:
[plain] mysql> update `user` set `host` = '%' where `user` = 'root'; mysql> flush privileges;
測試一下,如圖: