I've installed MySQL 5.5 recently. I'm using InnoDB as the engine for all my databases. I noticed that the mysql database default and all of it's tables (user, db, etc...) are MyISAM. Is there any reason they cannot / should not be InnoDB? Does anyone know if MySQL requires the mysql db to be MyISAM?
Warning
Do not convert MySQL system tables in the mysql database from MyISAM to InnoDB tables! This is an unsupported operation. If you do this, MySQL does not restart until you restore the old system tables from a backup or re-generate them with the mysql_install_db script.
http://dev.mysql.com/doc/refman/5.0/en/innodb-restrictions.html
Related
I am trying to manage mysql group replication and I noticed a problem when manipulating users and grants. 10 of the main mysql tables in the main mysql database are MyIsam. So I cant add databases or user permissions because they fail and wont replicate. Master-master group replication requirs everything InnoDB.
ALTER TABLE works fine on regular custom databases/tables but how do you fix this on the main mysql database?
I tried this but they all fail:
ALTER TABLE mysql.db ENGINE = InnoDB;
ALTER TABLE mysql.tables_priv ENGINE = InnoDB;
ALTER TABLE mysql.user ENGINE = InnoDB;
ERROR: ERROR 1726 (HY000): Storage engine 'InnoDB' does not support system tables.
Another error running CREATE USER...
[ERROR] Plugin group_replication reported: 'Table db does not use the InnoDB storage engine. This is not compatible with Group Replication'
ERROR 3098 (HY000): The table does not comply with the requirements by an external plugin group_replication.
Server version: 5.7.23-log MySQL Community Server
DO NOT CHANGE THE ENGINE FOR SYSTEM TABLES
MySQL has not yet changed the code enough to allow for mysql.* to be anything other than MyISAM. MySQL 8.0 makes the change by turning the tables (the "data dictionary") into a InnoDB tables, with radically different structure and capabilities.
Since you are at 5.7.23, you are only one (big) step away from 8.0.xx. Consider upgrading.
Replication works with MyISAM tables, but clustering replication does not -- Galera and InnoDB Cluster deal with those system MyISAM tables in other ways. See the documentation on what happens with GRANT, CREATE USER, etc. Do not use UPDATE and INSERT to manipulate the login-related tables.
(The Author of this Question seems to have fixed the problem by uninstalling a plugin.)
Hello just wondering because all our databases are innodb but mysql db is not.. so when I create a user is not replicating.. so instead of having to create the user on each node, wonder how hard will it be to upgrade the mysql.user table to innodb. thanks
All of my tables are InnoDB but PHPMyAdmin shows that the database is MyIsam: http://img708.imageshack.us/i/201103080940551280x800s.png/
How do I create new MySQL databases using InnoDB?
Running MySQL 5.1, in a Debian Sid box.
Thank you.
AFAIK it is showing MyISAM because that is your default storage engine on that database, i.e. if you were to create a new table and not specify the engine then it would be MyISAM.
You can change the default storage engine in your my.cnf file:
default-storage-engine=INNODB
Use MySQL Workbench for GUI interface:
http://wb.mysql.com/
You can it directly using SQL also:
ALTER TABLE products ENGINE = innodb
I have Mysql installed version 5.1.49-1ubuntu8.1 (with default InnoDB without any modification)
When using InnoDB, the mysqldump and read performance is comparable to MyISAM, but restore database is very slow.
When trying to install Drupal on blank database also take too long
Other than default-storage-engine = innodb, Is there anything I need to do before use InnoDB?
You should disable keys on the tables while restoring. This is the default behavior with the dumps generated from mysqldump. What is the command line you are using for dumping data?
You should dump the tables in the order of the primary key.
Hey, so I have recently become aware that in order to do foreign key relationships, I need to convert my tables over to innodb. I was wanting to do this in phpmyadmin and found the option for 'storage engine (type)' However my dropdown of options is limited to: MyISAM, MEMORY, and MRG_MYISAM
Would anyone be able to explain why this is?
apache 2.0
phpmyadmin 3.3.10
mysql 5.0.67
php 5.2.2
Thanks!
InnoDB support has to be enabled on the instance of MySQL you're using.
Try issuing a SHOW ENGINES SQL command to see what's available.