Multi Node Mysql cluster setup, API node mysqld not starting.

September 20, 2017 167 views
Clustering Ubuntu

I am following below link for Multi Node MySQL cluster setup.
https://www.digitalocean.com/community/tutorials/how-to-create-a-multi-node-mysql-cluster-on-ubuntu-16-04#

Almost all steps goes well till i start the mysqld on Manager Node.

After running -: sudo systemctl start mysqld
Error massage - : Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

Don't know what wrong i m doing followed exactly same steps given in document.

Note - I am doing this setup on AWS and not on DigitalOcean

2 Answers

"See "systemctl status mysqld.service" and "journalctl -xe" for details."

Answering my own question, I found the solution.
Note -:
While creating the "mysql" user and group on "manager.mysql.cluster" we are missing to do following, which is stopping Mysqld to start.

  1. sudo groupadd mysql
  2. sudo useradd -r -g mysql -s /bin/false mysql
  3. sudo mkdir -p /data/mysql
  4. sudo mkdir /var/lib/mysql-files
  5. sudo chown mysql:mysql /var/lib/mysql-files
  6. sudo chown mysql:mysql /data/mysql

Rest all the steps are perfectly correct. Now everything is working as expected.

But i want to test actual cluster benefit like taking node-1 down and checking if the web site or application is still working and again starting the node-1 and it should have all the database sync on it.

Kindly shade some light how can we do this practice before using it in real setup.

Thanks
Pushkar

Have another answer? Share your knowledge.