How to create a MySql innodb Cluster - mysql

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 ?

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.

MySQL NDB Cluster : Disable Replication for a table / database

In our project we are planning to introduce MySQL NDB cluster to have 99% uptime for our multiple applications dependent on MySQL.
So MySQL is being deployed in two machines. In both the machines Data Node, Management Server and SQL node is deployed and configured to form a cluster as shown in the below snippet.
Based on my understanding replication of data will be done for the data stored in Data Nodes. But can we restrict the replication only to a set of tables or database?
Reason for this query is, there are two applications that are dependent on MySQL, where only one application needs this replication and the other doesn't need this feature because it should connect to a standalone instance of MySQL to store it's local data which shouldn't be replicated as it would cause problem to the application running in another machine.
Please share your thoughts on this.
Though we have deployed MySQL NDB Cluster, the mysqld still supports INNODB storage type. So in order to achieve the above requested need, we created tables explicitly with Storage Engine by mentioning in CREATE TABLE statement like below. This overrode the storage configuration mentioned in my.cnf.
CREATE TABLE IF NOT EXISTS `CDS` (
`CD_ID` bigint(20) NOT NULL,
PRIMARY KEY (`CD_ID`)
) ENGINE=innodb

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

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

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

It's posible to use Federated table in MySQL NDB Cluster

I'm developing a application that needs two diferent databases, this is because one of this databases is per client and the other one is a generic database.
I'm thinking in make a MySQL NDB Cluster and i need to know if it's possible to uses some Federated tables in the Cluster or all must use ndbcluster engine.
If this is not posible, how can i make joins with tables that are in other host using ndbcluster?
Please forget about, why i need this schema (one databse per client and one generic database) because i spent a lot of time thinking which should be the best schema for my application i choosed this one.
Thanks in for your help!!!
MySQL Cluster uses a full version of mysqld (slightly modified), which includes all storage engines included on a standalone version. So the question for your answer is YES, you can have some tables in FEDERATED storage engine, or any other storage engine.
However, only tables with storage engine=ndbcluster will be replicated to all the api nodes connected to the cluster.
The federated approach with a cluster of two api nodes could work, but keep in mind that only those tables with the same storage engine can have referential integrity (FK) between them.
Which version of MySQL Cluster are you using? It is recommended using always the latest GA release (now 7.4.12)
Regards