I'm on Ubuntu 20.04 and was setting up a mysql cluster with 1 management node and 2 other nodes. I was following this tutorial as I'm new to this and am a student doing a project. heres the tutorial
I had a hard time setting up the cluster due to my group of 5 including me working off of Google Cloud Platform, so I first needed to set up a VPC peer connection. I got everything running smoothly after using the private IPs I set for each GCP account within /var/lib/mysql-cluster/config.ini
All 3 nodes were running and active. I was working on the final steps of the tutorial and installed all the dependencies for the cluster in Step 3. Once I reached the end of Step 3 the tutorial said to run 'sudo systemctl restart mysql' for the changes to take effect.
Once I did that, MySQL failed to reset and now it wont start.
This is the output from 'service mysql start'
service mysql startFailed to start mysql.service: Message recipient disconnected from message bus without replyingSee system logs and 'systemctl status mysql.service' for details.And this is the output from 'service mysql status'
ervice mysql status● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2024-04-15 00:04:41 UTC; 20min ago Process: 3681 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)Apr 15 00:04:40 jakes-ubuntu-server systemd[1]: Failed to start MySQL Community Server.Apr 15 00:04:41 jakes-ubuntu-server systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.Apr 15 00:04:41 jakes-ubuntu-server systemd[1]: Stopped MySQL Community Server.Apr 15 00:04:41 jakes-ubuntu-server systemd[1]: mysql.service: Start request repeated too quickly.Apr 15 00:04:41 jakes-ubuntu-server systemd[1]: mysql.service: Failed with result 'exit-code'.Apr 15 00:04:41 jakes-ubuntu-server systemd[1]: Failed to start MySQL Community Server.Apr 15 00:04:48 jakes-ubuntu-server systemd[1]: mysql.service: Start request repeated too quickly.Apr 15 00:04:48 jakes-ubuntu-server systemd[1]: mysql.service: Failed with result 'exit-code'.Apr 15 00:04:48 jakes-ubuntu-server systemd[1]: Failed to start MySQL Community Server.I figured out what made it break, I was instructed in the tutorial to go into the /etc/mysql/my.cnf file and add the following
. . .[mysqld]# Options for mysqld process:ndbcluster # run NDB storage engine[mysql_cluster]# Options for NDB Cluster processes:ndb-connectstring=198.51.100.2 # location of management serverSo my question is do I need this in the file to complete the cluster?