1

mysqld can't start without any info, that is the only information I get is 'Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!'.

I edited the my.cnf file to enable logging on /var/log/mysql/mysql.log but it apparently doesn't want to log anything.

So I don't know anything. I know there are many similar questions, but in most cases people are able to tell something more from the log file(s).

BTW, it is happening after abnormal system shutdown.

Update 1: in my.cnf file I can see a line like this: Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.

When I open the file I can see this: [mysqld_safe] syslog

What does it mean? How can I see error log?

Update 2: when I do mysqlcheck -u root -p --all-databases

I get "Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect"

Update 3: OK, now I know what syslog is:) It says: Can't start server : Bind on unix socket: No space left on device So now I have a final question - on which device?

6
  • Before making the recent changes, were you able to run the MySQL service?
    – ursitesion
    Commented Jan 2, 2015 at 8:02
  • Unless and untill, MySQL start, no command like mysqld, mysqlcheck will work.
    – ursitesion
    Commented Jan 2, 2015 at 8:03
  • Thanks, no I couldn't start it before. There was an abnormal system shutodwn, I coulnd't start the service even after a few machine restarts. Then I started digging in and then I reverted all my changes.
    – Konrad
    Commented Jan 2, 2015 at 8:24
  • Do a df -h to see if any of your drives/partitions are full - if so, clear down some space. Failing that, I might suggest a reinstall of the server software?
    – Vérace
    Commented Jan 2, 2015 at 10:29
  • Yes, I know this command, I just don't know where to look at. It tells me that the home directory has ~3.1GB of free space, so I believe it's enough? The only two dirs having low free space are / (/dev/sda1) - 15MB and /tmp (/dev/sda8) - 300MB - but how can I know which device does mysql talk about?
    – Konrad
    Commented Jan 2, 2015 at 11:08

1 Answer 1

0

the answer is there MySQL can not write to the directory you are pointing inside my.cnf, and it dose not have the right permissions. to fix this problem make sure the user MySQL has owner privileges on the directory that my.cnf is pointing for example lets say the base_dir is located under /MySQL , data_dir is located under /MySQL/data and the socket is located under /tmp in this example you need to make sure /MySQL and /MySQL/data are owned by MySQL user, for /tmp since its a default directory for Linux user MySQL should have read,write and execute privileges. also you need to make sure the partition that contain the data_dir is not full "contain enough free space"

1
  • Thanks, it appeared that I'm out of inodes, removing some temporary files solved the issue.
    – Konrad
    Commented Jan 7, 2015 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.