mysql升级后报Table 'mysql.servers' doesn't exist解决

解决Table 'mysql.servers' doesn't exist
今天遇到一事,就是我在升级mysql数据库后进入数据建立一远程用户,结果报错了。
?
1
2
mysql> flush privileges;
ERROR 1146 (42S02): Table'mysql.servers'doesn't exist


这是由于升级完数据库后丢失原有的系统表后造成的
解决方案:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
mysql> CREATETABLE`servers` (
-> `Server_name` char(64) NOTNULL,
-> `Host` char(64) NOTNULL,`Db` char(64) NOTNULL,
-> `Username` char(64) NOTNULL,
-> `Password` char(64) NOTNULL,
-> `Port` int(4) DEFAULTNULL,
-> `Socket` char(64) DEFAULTNULL,
-> `Wrapper` char(64) NOTNULL,
-> `Owner` char(64) NOTNULL,
-> PRIMARYKEY(`Server_name`)
-> ) ENGINE=MyISAM DEFAULTCHARSET=utf8 COMMENT='MySQL Foreign Servers table';
Query OK, 0 rowsaffected (0.05 sec)
mysql> flush privileges;
Query OK, 0 rowsaffected (0.00 sec)
mysql>


你可能感兴趣的:(mysql,数据库,socket,error,解决方案)