Hi, I’m getting some MySQL issues mentioned below. Initially, my server at digital ocean said it’s probably due to low memory but the first error below seems to suggest some kind of conflict. Anyway, right now MySQL is not running - and whenever I try to restart MySQL inside virtualmin i get the first message below.
“Another MySQL daemon already running with the same unix socket.
Starting mysqld: [FAILED]”
This second message appears whenever i try to edit users or edit databases.
“DBI connect failed : Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (111)”
Can someone point me in the right direction? Is it really just about memory, as there seems to be plenty of memory available on my server right now (altho that might be because MySQL is not running?).
Would appreciate some help.
If MySQL really is not running (the command
netstat -tpln | grep :3306 should return no line), try deleting the .sock file mentioned in the error message. It might be a leftover from a crashed instance.
If the netstat command does return a line, then MySQL is running after all. In that case, you’d need to tell us why you think it’s not running.
There is a bug in some of the later MySQL packages that cause this if MySQL isn’t shutdown cleanly, remove the file “/var/lib/mysql/mysql.sock” and then start the MySQL server.
rm -f /var/lib/mysql/mysql.sock
service mysqld start
Oh right, I remember now having read something like that in a thread here some weeks ago. One suggestion there was to add the rm command to MySQL’s startup script to remove the socket file.
thanks for help folks, but it was really to do with memory, so i implemented swapfile through putty to help with memory and that seems to have helped a lot - eventhough i know bugger all about this stuff, lol - but i see that I now have virtual memory showing up on my system when only Real memory showed up before implementing swapfile.