ERROR 1146 (42S02): Table 'mysql.servers' doesn't exist
作者:互联网
修改用户权限,刷新权限表,报1146 mysql> flush privileges; ERROR 1146 (42S02): Table 'mysql.servers' doesn't exist mysql> use mysql; mysql> show tables;可以看到servers表,在系统mysql 目录下,可以看到server.ibd 和server.frm,可知表定义为innodb表。 mysql> drop table if exists servers; Query OK, 0 rows affected, 1 warning (0.01 sec) mysql> show warnings; +---------+------+-------------------------------------+ | Level | Code | Message | +---------+------+-------------------------------------+ | Warning | 1146 | Table 'mysql.servers' doesn't exist | +---------+------+-------------------------------------+ 1 row in set (0.00 sec) mysql>CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', `Host` char(64) NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', `Username` char(64) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', `Port` int(4) NOT NULL DEFAULT '0', `Socket` char(64) NOT NULL DEFAULT '', `Wrapper` char(64) NOT NULL DEFAULT '', `Owner` char(64) NOT NULL DEFAULT '', PRIMARY KEY (`Server_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='MySQL Foreign Servers table' ERROR 1146 (42S02): Table 'mysql.servers' doesn't exist 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; Query OK, 0 rows affected(0.01 sec) 可以创建,数据库打开这张表的默认引擎为MyISAM,但是这张表在建表时的引擎为INNODB;
标签:1146,42S02,DEFAULT,mysql,servers,char,64,ERROR,NULL 来源: https://www.cnblogs.com/ghjbk/p/13495761.html