mysql innodb cluster : possible to upgrade myisam to innodb on live cluster? - mysql

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

Related

When creating a mysql table in AWS RDS with ENGINE=MyISAM, it overrides it with InnoDB

I am using '5.7.mysql_aurora.2.10.2' version of AWS Aurora MySQL instance and I have trying to create Log table with innoDB engine so I can Log things (INSERT query) combined with SIGNAL command. Something like this:
INSERT INTO Log(type, info, date) VALUES("ERROR", "Error happened...!", CURRENT_TIMESTAMP());
SIGNAL CUSTOM_EXCEPTION SET MESSAGE_TEXT = "Error happened...";
But as I found out, SIGNAL basically rolls back everything including my INSERT statement. I have been trying to figure out the workaround and I stumbled upon the DB tables with engine MyISAM which should solve my problem. So I decided to create a table for testing:
CREATE TABLE t (i INT) ENGINE = MYISAM;
And for some reason, the engine keeps being InnoDB. I have tested on my local instance and it works fine but as soon as I try it on my RDS database, it keeps changing back. I have tried to use ALTER TABLE but it doesn't work.
Is there a possibility that RDS has some configuration that doesn't let me use any other engine other than InnoDB?
Amazon Aurora only supports InnoDB.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Reference.html says:
Aurora MySQL clusters use the InnoDB storage engine for all of your data.
This is by design. They implemented their distributed storage by modifying the InnoDB storage engine. Aurora simply doesn't work with any other storage engine, so they disabled the capability to specify the storage engine for a table.
Aurora is not MySQL.

How to convert MAIN mysql database to InnoDB from MyIsam

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.)

How to create a MySql innodb Cluster

I am trying some days now to create a cluster with some nodes using the innodb database in MySQL but I can't find any documentation how to do so. Does anyone has a clue about it ?

Can the MySQL system database tables be converted to InnoDB?

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

Mysql InnoDB database

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