• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How To Start And Stop MySQL Cluster

by admin

It’s important to know how can we start and stop the entire MySQL cluster. In an earlier post, we have seen how to start/stop individual nodes on the MySQL Cluster without restarting the MySQL cluster itself.

Traditional Start and Stop

It is necessary to start each node in the cluster separately, in the following order:

  • Start the management node with the ndb_mgmd command
  • Start each data node with the ndbd command and option –nostart
  • Start each MySQL server (SQL node) using: mysqld_safe –user=mysql &

Each of these commands must be run from a system shell on the machine housing the affected node. You can verify the cluster is running by starting the MGM management client ndb_mgm on the machine housing the MGM node. Starting individual nodes can be done using the MGM management client start command:

mgm> 2 START

or if starting more than a specific node:

mgm> ALL START

To stop the server, use the MGM management client and use one of the commands:

mgm> 2 STOP    /* for individual node */
mgm> ALL STOP  /* stop all data nodes */
mgm> SHUTDOWN  /* stop the whole cluster */
How To Shut Down a Node in MySQL Cluster

Using MySQL Cluster Manager

The new MySQL Cluster Manager software allows the cluster to be configured and managed in a more user friendly way. To get a cluster up and going using the manager, the following steps should be taken:

  1. Install the MySQL Cluster Manager Agent on each of the different nodes.
  2. Download the cluster software package and make it available on each of the nodes.
  3. Create a site definition to manage the server and details.
  4. Create a package definition to manage the cluster software version.
  5. Create a cluster definition to manage the cluster and the nodes.
  6. Define the configuration settings for the cluster.
  7. Issue the start cluster command.

To stop the cluster, issue the command in MySQL Cluster Manager:

mcm> stop cluster mycluster;

Filed Under: mysql, MySQL Cluster

Some more articles you might also be interested in …

  1. How to use mysqldump without CREATE TABLE statements
  2. MySQL Shell: Using External Python Modules
  3. Multi-Versioning in MySQL Database
  4. How to Add Data Nodes to MySQL Cluster without Restarting the Cluster (version 6.4 and later)
  5. MySQL : Stored Procedure For Rotating the Audit Log
  6. How to Change the Default Character Set and Collation for a Database in MySQL
  7. Troubleshooting MySQL Query hung – “Waiting for Table Flush”
  8. Recommended Configuration of the MySQL Performance Schema
  9. How to List and Set SELinux Context for MySQL Server
  10. How to Disable Client Access Control in MySQL

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright