-- Create the Morpheus database
CREATE DATABASE morpheus CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -- Create the Morpheus database user
CREATE USER 'morpheus'@'%' IDENTIFIED BY 'morpheusDbUserPassword'; -- Grant required permissions
GRANT ALL PRIVILEGES ON morpheus.* TO 'morpheus'@'%' WITH GRANT OPTION;
GRANT SELECT, PROCESS, SHOW DATABASES, RELOAD ON *.* TO 'morpheus'@'%';
FLUSH PRIVILEGES;
-- Create the Morpheus database
CREATE DATABASE morpheus CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -- Create the Morpheus database user
CREATE USER 'morpheus'@'%' IDENTIFIED BY 'morpheusDbUserPassword'; -- Grant required permissions
GRANT ALL PRIVILEGES ON morpheus.* TO 'morpheus'@'%' WITH GRANT OPTION;
GRANT SELECT, PROCESS, SHOW DATABASES, RELOAD ON *.* TO 'morpheus'@'%';
FLUSH PRIVILEGES;
-- Create the Morpheus database
CREATE DATABASE morpheus CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -- Create the Morpheus database user
CREATE USER 'morpheus'@'%' IDENTIFIED BY 'morpheusDbUserPassword'; -- Grant required permissions
GRANT ALL PRIVILEGES ON morpheus.* TO 'morpheus'@'%' WITH GRANT OPTION;
GRANT SELECT, PROCESS, SHOW DATABASES, RELOAD ON *.* TO 'morpheus'@'%';
FLUSH PRIVILEGES;
mysql['enable'] = false
mysql['host'] = {'127.0.0.1' => 6446} # MySQL Router local endpoint
mysql['morpheus_db'] = 'morpheus'
mysql['morpheus_db_user'] = 'morpheus'
mysql['morpheus_password'] = 'morpheusDbUserPassword'
mysql['enable'] = false
mysql['host'] = {'127.0.0.1' => 6446} # MySQL Router local endpoint
mysql['morpheus_db'] = 'morpheus'
mysql['morpheus_db_user'] = 'morpheus'
mysql['morpheus_password'] = 'morpheusDbUserPassword'
mysql['enable'] = false
mysql['host'] = {'127.0.0.1' => 6446} # MySQL Router local endpoint
mysql['morpheus_db'] = 'morpheus'
mysql['morpheus_db_user'] = 'morpheus'
mysql['morpheus_password'] = 'morpheusDbUserPassword'
You (on master node) └── innodb_cluster_setup.py (Python orchestrator) ├── Step 1-9: Interactive wizard (collect & validate) └── Step 10: Ansible playbook execution ├── Role 01: OS Pre-configuration ├── Role 02: MySQL Installation ├── Role 03: InnoDB Cluster Pre-configuration └── Role 04: Cluster Creation (master only) └── Step 11: Setup Report
You (on master node) └── innodb_cluster_setup.py (Python orchestrator) ├── Step 1-9: Interactive wizard (collect & validate) └── Step 10: Ansible playbook execution ├── Role 01: OS Pre-configuration ├── Role 02: MySQL Installation ├── Role 03: InnoDB Cluster Pre-configuration └── Role 04: Cluster Creation (master only) └── Step 11: Setup Report
You (on master node) └── innodb_cluster_setup.py (Python orchestrator) ├── Step 1-9: Interactive wizard (collect & validate) └── Step 10: Ansible playbook execution ├── Role 01: OS Pre-configuration ├── Role 02: MySQL Installation ├── Role 03: InnoDB Cluster Pre-configuration └── Role 04: Cluster Creation (master only) └── Step 11: Setup Report
git clone https://github.com/emrbaykal/morpheus-innodb-cluster.git
cd morpheus-innodb-cluster
sudo python3 innodb_cluster_setup.py
git clone https://github.com/emrbaykal/morpheus-innodb-cluster.git
cd morpheus-innodb-cluster
sudo python3 innodb_cluster_setup.py
git clone https://github.com/emrbaykal/morpheus-innodb-cluster.git
cd morpheus-innodb-cluster
sudo python3 innodb_cluster_setup.py
# Quick cluster status check
mysqlsh [email protected] -- cluster status # Interactive cluster management
mysqlsh [email protected]
var cluster = dba.getCluster();
cluster.status(); # Bootstrap MySQL Router (run on each Morpheus app node)
mysqlrouter --bootstrap [email protected]:3306 --user=mysqlrouter
# Quick cluster status check
mysqlsh [email protected] -- cluster status # Interactive cluster management
mysqlsh [email protected]
var cluster = dba.getCluster();
cluster.status(); # Bootstrap MySQL Router (run on each Morpheus app node)
mysqlrouter --bootstrap [email protected]:3306 --user=mysqlrouter
# Quick cluster status check
mysqlsh [email protected] -- cluster status # Interactive cluster management
mysqlsh [email protected]
var cluster = dba.getCluster();
cluster.status(); # Bootstrap MySQL Router (run on each Morpheus app node)
mysqlrouter --bootstrap [email protected]:3306 --user=mysqlrouter
mysql -u root -p CREATE DATABASE morpheus CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'morpheus'@'%' IDENTIFIED BY 'morpheusDbUserPassword';
GRANT ALL PRIVILEGES ON morpheus.* TO 'morpheus'@'%' WITH GRANT OPTION;
GRANT SELECT, PROCESS, SHOW DATABASES, RELOAD ON *.* TO 'morpheus'@'%';
FLUSH PRIVILEGES;
mysql -u root -p CREATE DATABASE morpheus CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'morpheus'@'%' IDENTIFIED BY 'morpheusDbUserPassword';
GRANT ALL PRIVILEGES ON morpheus.* TO 'morpheus'@'%' WITH GRANT OPTION;
GRANT SELECT, PROCESS, SHOW DATABASES, RELOAD ON *.* TO 'morpheus'@'%';
FLUSH PRIVILEGES;
mysql -u root -p CREATE DATABASE morpheus CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'morpheus'@'%' IDENTIFIED BY 'morpheusDbUserPassword';
GRANT ALL PRIVILEGES ON morpheus.* TO 'morpheus'@'%' WITH GRANT OPTION;
GRANT SELECT, PROCESS, SHOW DATABASES, RELOAD ON *.* TO 'morpheus'@'%';
FLUSH PRIVILEGES;
mysqlrouter --bootstrap [email protected]:3306 --user=mysqlrouter
systemctl enable mysqlrouter && systemctl start mysqlrouter
mysqlrouter --bootstrap [email protected]:3306 --user=mysqlrouter
systemctl enable mysqlrouter && systemctl start mysqlrouter
mysqlrouter --bootstrap [email protected]:3306 --user=mysqlrouter
systemctl enable mysqlrouter && systemctl start mysqlrouter
mysql['enable'] = false
mysql['host'] = {'127.0.0.1' => 6446}
mysql['morpheus_db'] = 'morpheus'
mysql['morpheus_db_user'] = 'morpheus'
mysql['morpheus_password'] = 'morpheusDbUserPassword'
mysql['enable'] = false
mysql['host'] = {'127.0.0.1' => 6446}
mysql['morpheus_db'] = 'morpheus'
mysql['morpheus_db_user'] = 'morpheus'
mysql['morpheus_password'] = 'morpheusDbUserPassword'
mysql['enable'] = false
mysql['host'] = {'127.0.0.1' => 6446}
mysql['morpheus_db'] = 'morpheus'
mysql['morpheus_db_user'] = 'morpheus'
mysql['morpheus_password'] = 'morpheusDbUserPassword'
morpheus-ctl reconfigure
morpheus-ctl reconfigure
morpheus-ctl reconfigure
git clone https://github.com/emrbaykal/morpheus-innodb-cluster.git
cd morpheus-innodb-cluster
sudo python3 innodb_cluster_setup.py
git clone https://github.com/emrbaykal/morpheus-innodb-cluster.git
cd morpheus-innodb-cluster
sudo python3 innodb_cluster_setup.py
git clone https://github.com/emrbaykal/morpheus-innodb-cluster.git
cd morpheus-innodb-cluster
sudo python3 innodb_cluster_setup.py - MySQL version v8.0.x (minimum of v8.0.72)
- MySQL cluster with at least 3 nodes for redundancy
- Morpheus application nodes must have connectivity to the MySQL cluster - Step 5 — RHEL Repository Check: Verifies that rhel-9-for-x86_64-baseos-rpms and rhel-9-for-x86_64-appstream-rpms are enabled on all nodes.
- Step 6 — Pre-Flight MySQL Package Check: Scans all nodes for pre-existing mysql-server and mysql-shell installations that could cause conflicts.
- Step 7 — Internet Connectivity Check: Tests that all nodes can reach dev.mysql.com to download MySQL packages. - pre_tasks — Populates /etc/hosts with cluster node entries and sets hostnames on all nodes
- 01-os-preconfigure — Deploys SSH banners, disables SELinux/AppArmor, configures firewall rules (ports 3306, 33060, 33061), sets locale, installs and configures NTP (chrony/systemd-timesyncd), tunes kernel parameters for database workloads, disables Transparent Huge Pages, and sets MySQL-specific system limits
- 02-mysql-install — Adds the MySQL repository, selects the AppStream stream/version, installs MySQL Server and MySQL Shell, configures systemd overrides with NUMA interleaving, and sets the root password
- 03-mysql-innodb-cluster — Creates the cluster admin user, removes anonymous users, drops the test database, writes InnoDB-optimized my.cnf configuration (with buffer pool auto-sized to 80% of RAM), enables GTID mode, and restarts MySQL
- 04-mysql-create-innodb-cluster — Runs on the master node only: configures instances via dba.configureInstance() in MySQL Shell, creates the cluster with dba.createCluster(), adds secondary nodes with clone-based recovery, verifies cluster status, and creates the routeruser account - Kernel parameters: TCP backlog, connection queue, TIME_WAIT reuse, swap minimization, dirty page ratios, file descriptor limits, and async I/O limits
- MySQL limits: 65,535 open files, 65,535 processes, unlimited memory lock
- NUMA interleaving: MySQL runs with numactl --interleave=all for optimal memory access on multi-socket servers
- InnoDB buffer pool: Automatically sized to 80% of total RAM
- GTID-based replication: Required for InnoDB Cluster and enabled automatically
- Binary log management: Automatic purge after 7 days - HPE Morpheus Enterprise v8.1.0 — HA Installation Overview
- HPE Morpheus Enterprise v8.1.0 — 3-Node HA Install Example
- MySQL InnoDB Cluster Documentation
- MySQL Shell — Deploying Production InnoDB Cluster