All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
MySQL server won't start
Yo,
A brief introduction: I run a 512 MB "droplet" VPS at DigitalOcean, OS is Debian 7 x64, and the MySQL server I use is MariaDB. So far I haven't had any issues with it, but it just mysteriously broke.
Today after about 3 weeks of not opening up the CLI I tried to add a new MySQL database. When the command failed to run repeatedly, I then tried to restart the MySQL service. When it was starting it, it came up as failed.
I've tried reinstalling MariaDB, I've checked the logs, they had nothing in them, and I've rebooted the droplet a few times. No go.
Says it can't connect to the socket, and it's not a permissions issue as far as I can tell.
It's really weird because before today I hadn't touched anything for about 3 weeks, and my sites that use MySQL were working fine.
Any ideas why this is happening? I appreciate any help.
Comments
Check free space in /tmp.
Got plenty of free space in tmp.
I got that, check the logs in /var/log/myswl or try to start the service manually. I can't recall on my head, but I readed the /etc/init.d/mysql file to know the actual command, it helped me debug. It is probably a config line
There's only a bunch of mariadb-bin.00000xx files in /var/log/mysql/ and they seem to contain table operation logs in gibberish.
Exact text of the error might be helpful. You could also try an strace of the init script and see if you get more targeted information.
When I try to start the mysql service I get this:
luke@enigma:/var/log$ sudo /etc/init.d/mysql start
[sudo] password for luke:
[FAIL] Starting MariaDB database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
Will try to reproduce the socket error.
How do you trace an init script?
strace -t /etc/init.d/mysql
Open /etc/init.d/mysql and search for the exact command
Might want to check if /etc/my.cnf got changed. Maybe try replace it with a default config and see what happens.
I know you said you checked but it could still be a permissions problem. Permissions are the biggest headache with Linux imho. Often don't generate error logs so hard to troubleshoot. Can sometimes be some totally unexpected and seemingly unrelated folder/file like /etc/hosts.
Also might want to try some standard troubleshooting things. Like disabling SELinux and IPtables if enabled.
make sure you have a loopback interface (lo) - whenever your mysql listening on
"Command not found: strace"
What package do I need to install?
Wouldn't purging MariaDB and installing it again replace the my.cnf though?
Alright, well I'll play around with the permissions some more. I don't know where else to check though.
I don't remember if I installed IPtables, how would I check that?
Package should install as just strace if memory serves.
Managed to trace it to a bad my.cnf file, which worked fine 3 weeks ago. What's wrong here?
http://pastebin.com/vUUhzWvF
innodb_flush_method =
No value?
innodb_additional_mem_pool_size=8m <- Does it work like that? Shouldnt it be like size = 8m?
do a sudo mysqld and see the output ?
Not sure what you're talking about, innodb_flush_method has a value:
innodb_flush_method = O_DIRECT
And the spaces don't matter.
Then provide the output of: strace /etc/init.d/mysql start
It said bad my.cnf at the end? I guess you could output ls and lsattr but I doubt anything changed in that direction.
No, on a whim I used the default my.cnf and bam everything worked.
Oh interesting. My eyes aren't catching the issue in the original. Glad it's working for you though.
Use your bad my.cnf file and do this:
/usr/bin/mysqld_safe
default my.cnf is slow
Wow, thanks. Checked the log generated by that and apparently the "skip-locking" flag in the config was causing the problems.
Thanks guys!
I told you before to do that, but you didn't do it -.-
I don't see it in this thread other than that one post.
Lol, oh well.
Maybe i wasnt clear enough