Hi all
I’m following this tutorial to setup a mySQL cluster
I already install PXC, change root password, and update my.cnf but when i use command to bootstrap first node, it fail, then i use recommend command to check, i saw that below:
You don’t need to do that. systemd will do that automatically for you.
You need to look at MySQL’s error log for details on why the bootstrap failed. The journald log won’t have anything of importance.
Also, even in a VM, you can simply select/copy/paste from the VM window into this forum. Don’t use the VM terminal. Start the VM, then use your normal SSH program to access the VM as if it were a remote host. Please avoid screenshots.
Hi
i re-setup cluster, but it still not run. seem that it cannot run mysql service
I check status of mysql@bootstrap.service, it running but when check status of mysql, it failed
Oct 06 08:37:12 2c7ced03-244b-4d93-bd39-635a141902af systemd[1]: Starting Percona XtraDB Cluster with config /etc/sysconfig/mysql.bootstrap…
Oct 06 08:37:14 2c7ced03-244b-4d93-bd39-635a141902af mysql-systemd[4452]: SUCCESS!
Oct 06 08:37:14 2c7ced03-244b-4d93-bd39-635a141902af systemd[1]: Started Percona XtraDB Cluster with config /etc/sysconfig/mysql.bootstrap.
Oct 06 08:16:04 2c7ced03-244b-4d93-bd39-635a141902af systemd[1]: Starting Percona XtraDB Cluster…
Oct 06 08:16:24 2c7ced03-244b-4d93-bd39-635a141902af mysql-systemd[3389]: SUCCESS!
Oct 06 08:16:24 2c7ced03-244b-4d93-bd39-635a141902af systemd[1]: Started Percona XtraDB Cluster.
Oct 06 08:17:35 2c7ced03-244b-4d93-bd39-635a141902af systemd[1]: Stopping Percona XtraDB Cluster…
Oct 06 08:17:36 2c7ced03-244b-4d93-bd39-635a141902af mysql-systemd[3433]: SUCCESS! Stopping Percona XtraDB Cluster…
Oct 06 08:17:48 2c7ced03-244b-4d93-bd39-635a141902af mysql-systemd[3464]: WARNING: mysql pid file /var/run/mysqld/mysqld.pid empty or not readable
Oct 06 08:17:48 2c7ced03-244b-4d93-bd39-635a141902af mysql-systemd[3464]: WARNING: mysql may be already dead
Oct 06 08:17:48 2c7ced03-244b-4d93-bd39-635a141902af systemd[1]: Stopped Percona XtraDB Cluster.
When you start cluster for first time on first node, you need to bootstrap it and use mysql@bootstrap service.
After bootstrap you can start other two nodes.
If you want mysql service to be started on the bootstrapped node,
you can safely stop mysql@bootstrap and start mysql again. But you should make sure that other two nodes are online. If there are nodes online in the cluster you dont need to use bootstrap service.
Hope that clears.
There are only two option: 1) start mysql@bootstrap, or 2) start mysql. If you run start mysql@bootstrap, then yes, status mysql will show stopped and status mysql@bootstrap will show running. This is because you told systemd to start mysql@bootstrap. This is perfectly normal. mysql and mysql@bootstrap are two different systemd unit files and thus systemd treats them separately.