mysql - mysql.user 表的引擎可以从 MyISAM 转换为 InnoDb 吗?

标签 mysql innodb myisam

我在我的生产 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/

相关文章:

mysql - 比如搜索区分大小写?

mysql - 为什么 Index 只在强制使用时使用,默认不使用?

mysql - InnoDB 引擎简单更新查询花费的时间太长 (query_end)

php - 输出行没有重复项

php - Prestashop 类别页面加载速度太慢

MySQL 添加连接会减慢整个查询

mysql - 没有锁的事务中读-过滤-写可能出现哪些失败模式?

MySQL删除并加入

PHP表单不插入数据

php - mysql WHERE子句为空时,返回所有行