我在我的生产 MySQL 数据库上运行了以下查询:
SELECT CONCAT('`', table_schema,'`.`', table_name, '`') AS schema_tables
FROM information_schema.tables AS tb
WHERE `ENGINE` = 'MyISAM'
AND `TABLE_TYPE` = 'BASE TABLE'
ORDER BY table_name DESC;
它返回了 mysql 模式中的所有表,其中一些是:
`mysql`.`user`
`mysql`.`time_zone_transition_type`
`mysql`.`time_zone_transition`
`mysql`.`time_zone_name`
`mysql`.`time_zone_leap_second`
`mysql`.`time_zone`
`mysql`.`tables_priv`
`mysql`.`servers`
`mysql`.`proxies_priv`
...
我的查询是:
1. 这些可以安全地转换为innodb吗?
2. 为什么它们首先出现在 MyISAM 引擎中?是我改错了还是默认了?
服务器版本:5.6.22-log MySQL Community Server (GPL)
PS:我知道 InnoDb 是 5.6 的默认引擎,我从来没有运行任何查询来转换为 MyISAM。
最佳答案
不,你不能!
作为docs说:
Important
Do not convert MySQL system tables in the mysql database (such as user or host) to the InnoDB type. This is an unsupported operation. The system tables must always be of the MyISAM type.
关于mysql - mysql.user 表的引擎可以从 MyISAM 转换为 InnoDb 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32902339/