Try to connect to Galera mysql.
Hi,
I am truing to connect to Galera mysql and have he following
Oct 09 12:52:33 gmysql Connection failed: Unable to connect to database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Oct 09 12:52:33 Caught an exception instantiating a backend, cleaning up
Oct 09 12:52:33 TCP server is unable to launch backends - will try again when questions come in: Unable to launch gmysql connection: Unable to connect to database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Oct 09 12:52:33 About to create 3 backend threads for UDP
Oct 09 12:52:33 Master/slave communicator launching
Oct 09 12:52:33 gmysql Connection failed: Unable to connect to database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Oct 09 12:52:33 Caught an exception instantiating a backend, cleaning up
Oct 09 12:52:33 Communicator thread died because of error: Unable to launch gmysql connection: Unable to connect to database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
% Oct 09 12:52:33 gmysql Connection failed: Unable to connect to database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Oct 09 12:52:33 Caught an exception instantiating a backend, cleaning up
Oct 09 12:52:33 gmysql Connection failed: Unable to connect to database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Oct 09 12:52:33 Caught an exception instantiating a backend, cleaning up
Oct 09 12:52:33 gmysql Connection failed: Unable to connect to database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Oct 09 12:52:33 Caught an exception instantiating a backend, cleaning up
Thanks
George
-
Hi George,
What is the status of Galera cluster as reported by ClusterControl? If ACTIVE, try to check whether mysql is running on each of the DB node:
$ ps -ef | grep mysql
It seems like your application was trying to connect to local MySQL using socket, but it does not exist. Please do check that the socket file exists under /var/run/mysqld/ but you need to make sure mysql service is running fine beforehand:
$ ls -la /var/run/mysqld/mysqld.sock
Are you co-locating your application with the DB node? If not, make sure the application has been configured correctly to connect to the corresponding DB node.
Regards,
Ashraf
-
Hi,
Did you capture any error reported by phpmyadmin/mysql client during the single node down time? What is the status of your Galera cluster as reported by ClusterControl on that time? Have you GRANT correct user host for phpmyadmin?
SSH to the database host and connect via mysql client:
$ mysql -uroot -p<root password> -hlocalhost
Then, run following query to verify you have setup GRANT correctly:
show grants for <phpmyadmin user>@<phpmyadmin host IP>;
Let us know the outcome.
Regards,
Ashraf
Please sign in to leave a comment.
Comments
4 comments