mysql drbd error 2002
i'm trying to add a mysql server as a drbd resource on a server
i have followed this tutorialfuther more i have done the following sql on the mastergrant all on mysql.user TO ‘crm’@’%’ IDENTIFIED BY ‘password’;
grant all on mysql.user TO ‘crm’@’localhost’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'IP' IDENTIFIED BY 'password';where password the actual password and ip the the ip of the other node
i have also disabled apparmor for the mysql server and i've overriden any way the mysql server starts automatically by doing echo "manual" >> /etc/init/mysql.override i have also attemped to put the permission for the mysql folder on the drbd mount right by doing chmod 777 /service/mysql on the second node. i have also move the socket and changed to mysql resource to a ocf resource and defined the new socket directory in the crm config.
now i am able to log into the database on the first node but when failover occurs i cannot log into the database on the second node instead i get the error #2002 - No such file or directory<br />The server is not responding (or the local server's socket is not correctly configured). i'm also getting this error on the first server when trying to log in via cli
i find it interesting and weird that on the node i can log into the database systemctl status mysqlreturnsnot running while on the node i can't log in the database the same command returns running
1 Answer
i find it interesting and weird that on the node i can log into the database systemctl status mysqlreturns not running while on the node i can't log in the database the same command returns running
appearantly this is because the mysql server is suppose to be started by heartbeat/pacemaker/corosync as such it shouldn't report it as running at all
i am able to log into the database on the first node but when failover occurs i cannot log into the database on the second node instead i get the error #2002 - No such file or directory
The server is not responding (or the local server's socket is not correctly configured).
appearantly this was because after failover it was not considered "localhost" so that when this check happened
if (empty($dbserver)) $dbserver = 'localhost'; $cfg['Servers'][$i]['host'] = $dbserver; if (!empty($dbport) || $dbserver != 'localhost') { $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['port'] = $dbport; }it was trying to connect via tcp this was solved by replacing "tcp" with "socket"
More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"