今天刚在一台服务器上安装好mysql,对mysql进行安全加固之后,一刷新权限,结果报错,说mysql.servers表不存在.
mysql> flush privileges;
ERROR 1146 (42S02): Table 'mysql.servers' doesn't exist
既然不存在那就创建一个,当然要先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 COMMENT='MySQL Foreign Servers table';
OK,问题解决了.
mysql> flush privileges;
Query OK, 0 rows affected (0.06 sec)