1
[root@myserver my.cnf.d]# service mysql start
Starting MySQL. ERROR!

And this is all I get. I tried checking the logs but couldn't find anything related to this. The database worked perfectly fine until I restarted the machine. The database server is actually a MariaDB instance.

Anyone has any idea where could I even look for the source of the problem?

The system log does not contain anything meaningful either:

cat /var/log/messages
#last few lines:
Apr 22 11:00:01 myserver systemd: Started Session 128 of user root.
Apr 22 11:01:01 myserver systemd: Starting Session 129 of user root.
Apr 22 11:01:01 myserver systemd: Started Session 129 of user root.
Apr 22 11:10:01 myserver systemd: Starting Session 130 of user root.
Apr 22 11:10:01 myserver systemd: Started Session 130 of user root.
4
  • Check the system logs also Apr 22, 2015 at 9:17
  • I tried checking the system log for CentOS which as to what I found on the internet is at /var/log/messages. However, it contains nothing related.
    – kori0129
    Apr 22, 2015 at 10:10
  • Installed anything that might be listening to the MySQL port and causing your MySQL to fail to start?
    – Kinnectus
    Apr 22, 2015 at 10:25
  • I tried running the following command to check: "netstat -anp | grep 3306", however it returned nothing, which I think means that there aren't anything else trying to run on that port.
    – kori0129
    Apr 22, 2015 at 10:40

1 Answer 1

3

Apparently, the server logging was disabled. I had to edit /etc/my.cnf.d/server.cnf and add the following line under section mysqld:

   log-error=/var/log/mysqllog

After that, I could get proper logs which then allowed me to determine the problem (in my case it was an access right issue to the folders after a restore.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .