Question

mysql galera cluster - shutdown and restart

Dear All,

I have followed the below tutorial to install galera cluster with mysql-5-6 on ubuntu-16-04, and installed successfully using 3 node (VMs). but after stop mysql from node 3 and 2 then stop galera form node 1 then shutdown the VM. and when try to restart galera it fails!

n3usr@node3:~$ sudo systemctl stop mysql => successfully stopped n2usr@node2:~$ sudo systemctl stop mysql => successfully stopped n1usr@node1:~$ sudo /etc/init.d/mysql stop --wsrep-new-cluster => successfully stopped

once restarted the node1 try to start cluster but fails… n1usr@node1:~$ sudo /etc/init.d/mysql start --wsrep-new-cluster [sudo] password for n1usr:
Starting MySQL .210227 06:45:06 mysqld_safe Directory ‘/var/run/mysqld’ for UNIX socket file don’t exists.

  • The server quit without updating PID file (/var/run/mysqld/mysqld.pid).

it would be great help if you let me know how to successfully stop cluster and shutdown the server then start again the cluster once server is up and running.

tutorial link -> https://www.digitalocean.com/community/tutorials/how-to-configure-a-galera-cluster-with-mysql-5-6-on-ubuntu-16-04


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there,

Usually the /var/run/mysqld should be created by default after the MySQL installation.

You could try creating it manually with the following command:

mkdir -p /var/run/mysqld

And then set the correct ownership:

chown mysql:mysql /var/run/mysqld

Let me know how it goes. Regards, Bobby