Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL database engine: MyISAM for information_schema but InnoDB for other databases

I am currently using InnoDB for all my databases in MySQL, however I just noticed that my information_schema database uses MyISAM for tables that are not MEMORY.

I am in the process of investigating an InnoDB/MyISAM issue. While I don't think this is the cause of it, I am worried about this mixing. The database was originally set up with MyISAM. Later the my.cnf file was updated to reset the engine to InnoDB. I am using MySQL 5.5.10.

What are the possible issues that could occur with having your information_schema database set to MyISAM, but all your other databases set to MySQL?


For those looking for help: If you came across this question in search of an answer or you want to know more, to see your default database engine:

show variables;

To see the engine assigned to tables in a database:

show table status;

My my.cnf settings:

[client]
default-character-set=utf8

[mysqld]
log=/usr/local/var/mysql/mysqld.log
character-set-server = utf8
collation-server = utf8_general_ci
lower_case_table_names=2
default_storage_engine=InnoDB

# Performance hacks:
innodb_flush_method=nosync
innodb_flush_log_at_trx_commit=0
like image 297
jackiekazil Avatar asked Apr 24 '12 19:04

jackiekazil


1 Answers

The storage engine used is on a per-table basis. The default storage engine is used when creating a new table and you don't specify a storage engine for the new table.

The system tables would have been MyISAM regardless of what you set the default storage engine to.

From MySQL documentation:

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.

If you are not querying the information_schema tables directly, there is no concern about mixing the types.

like image 67
Marcus Adams Avatar answered Oct 14 '22 13:10

Marcus Adams