Table ´mysql.servers´ doesn´t exist and not allowed to connect to MySQL server解決 今天在家安裝wamp,安裝完默認mysql root密碼為空,修改密碼flush privileges後,提示: ERROR 1146 (42S02): Table 'mysql.servers' doesn't exist 解決方法為,建立mysql.servers表: CREATE TABLE mysql.servers ( Server_name char(64) NOT NULL, Host char(64) NOT NULL, Db char(64) NOT NULL, Username char(64) NOT NULL, Password char(64) NOT NULL, Port int(4) DEFAULT NULL, Socket char(64) DEFAULT NULL, Wrapper char(64) NOT NULL, Owner char(64) NOT NULL, PRIMARY KEY (Server_name) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table'; 而後flush privileges;成功,然而在退出再登陸時提示: ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server 解決方法: 在mysql.ini中加入 skip-grant-tables行,保存。 net stop wampmysqld net start wampmysqld mysql -u root登入後,修改 update mysql.user set password=password('123456') where user='root' and host='localhost'; flush privileges; 將mysql.ini裡的skip-grant-tables行去掉,OK,問題解決。 後面找到問題所在,在修改root密碼時,粗心用的: update mysql.user set password=md5('123456') where user='root' and host='localhost'; 導致的無法登陸。