How to Fix MySQL “Table ‘mysql.servers’ Doesn’t Exist” Error

    After installing MySQL, another system issue occurred. While checking the MySQL error log, I stumbled upon the error “Table 'mysql.servers' doesn't exist,”
which, although unrelated to my own problem, still caught my attention.
Analysis showed that the mysql.servers table was missing.
After searching online for solutions, I found two ways to fix this issue:
Solution 1: Create the table manually.
use mysql;
CREATE TABLE `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;
 
Solution 2: Execute the repair script and let MySQL fix itself. The mysql_fix_privilege_tables.sql script located in the share directory is the repair script; simply execute it.

Cause: This issue arises from inconsistencies introduced during version upgrades.

Leave a Comment

Your email address will not be published.