Wednesday, May 8, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3865  / 3 Years ago, thu, november 11, 2021, 3:10:33

I've just installed MySql to support a mediawiki install on 12.04 64bit.
Everything appears to be working ok, except that at boot-up, mysql server fails to start.
This results in an error appearing on the webpage:



Can't connect to local MySQL server through socket /var/run/mysqld/mysqld.sock



When I discover this, and run



sudo service mysql start


It all works ok after that until the next reboot.



I can't figure out what is going on.



There appear to be several similar issues being reported, however most of these appear to be outright failure to start - i.e. manual start or on boot-up fails.
I haven't seen anything relating to a "transient" error like this.



For the record, I've got a fairly standard install - I didn't fiddle with settings - just the bind address in /etc/mysql/my.cnf
I thought maybe something to do with drive mounting, but datadir is on /var which is on the main partition.



any clues? Suggestions even for a workaround?



Only workaround I'm toying with is to set a cronjob at intervals of every half hour or so.


More From » 12.04

 Answers
3

I think I know what the problem was....
my dodgy router...



Our modem/router as a bad FW build on it (which I'm working on separately) which requires rebooting several times a day. This meant that often at bootup in the morning, the router would be "down", and the computer wouldn't even be able to get an IP address.



That IP address is a fixed address assigned by the router, and is set as the "bind address" in mysql configuration file ("my.cnf")



I haven't tested my theory properly, but I have noticed that sometimes it works at bootup and sometimes not. And I definitely know that it fails to start if the bind address is wrong - exhibiting the same sorts of failure messages in dmesg.



Thanks all for responding!


[#36150] Friday, November 12, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ilityushing

Total Points: 18
Total Questions: 100
Total Answers: 113

Location: Senegal
Member since Wed, May 13, 2020
4 Years ago
;