1

Hi my mySql server crashed for some hours ago and now I can't start it again. I am running this command to start mySql: sudo /etc/init.d/mysql start I got this error message when I run the command:

[....] Starting mysql (via systemctl): mysql.serviceJob for mysql.service failed. See "systemctl status mysql.service" and "journalctl -xe" for details.
failed!

the output of systemctl status mysql.service:

● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (start-post) since ons 2016-07-06 13:38:31 CEST; 1min 41s ago
  Process: 8062 ExecStart=/usr/bin/mysqld_safe (code=exited, status=0/SUCCESS)
  Process: 8059 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 8062 (code=exited, status=0/SUCCESS);         : 8063 (mysql-systemd-s)
   CGroup: /system.slice/mysql.service
           └─control
             ├─8063 /bin/bash /usr/share/mysql/mysql-systemd-start post
             └─8768 sleep 1

jul 06 13:38:31 ubuntuServerEmil systemd[1]: Starting MySQL Community Server...
jul 06 13:38:31 ubuntuServerEmil mysqld_safe[8062]: 160706 13:38:31 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.
jul 06 13:38:31 ubuntuServerEmil mysqld_safe[8062]: 160706 13:38:31 mysqld_safe Logging to '/var/log/mysql/error.log'.
jul 06 13:38:31 ubuntuServerEmil mysqld_safe[8062]: 160706 13:38:31 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

It looks like it is an logging error but how do I fix it?

UPDATE Found the following error in the log: /var/log/mysql/error.log

2016-07-06 07:15:03 58630 [ERROR] /usr/sbin/mysqld: unknown variable 'audit-log=ON'
  • You can try to reconfigure MuSQL. Use these commands: sudo /etc/init.d/mysql stop then sudo dpkg-reconfigure mysql-server-5.5 or sudo dpkg-reconfigure mysql-server then finally sudo /etc/init.d/mysql start – Parto Jul 6 '16 at 11:47
  • I can't run the dpkg-reconfigure commands I got an error that mysql-server-5.5 is not installed and the same for mysql-server. I use Ubuntu server 15.04 – Emil Rowland Jul 6 '16 at 12:44
  • What do you get when you type the command mysql on the terminal? – Parto Jul 6 '16 at 12:48
  • Actually I think I found the problem in the config file there was an error in a row after fixing that I can start the server again. I guess something made the server restart in the night and when it read the config file it get the error. Because the mysql server has run for some month now so I didn't thought that something I did for along time ago should create an error now. But now everything works fine again. – Emil Rowland Jul 6 '16 at 12:53
  • I found the real error in an log file where it sad this: unknown variable 'audit-log=ON' – Emil Rowland Jul 6 '16 at 12:55
1

After I founded the error message in /var/log/mysql/error.log

2016-07-06 07:15:03 58630 [ERROR] /usr/sbin/mysqld: unknown variable 'audit-log=ON'

Then I opened the config file /etc/mysql/my.cnf and founded a row with the statement audit-log=ON I deleted that row and tested to start the server again with sudo /etc/init.d/mysql start the first time it did't work but after running sudo /etc/init.d/mysql start again the MySql server started and working normally again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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