Today I have changed mysql config file and restarted mysql with:
service mysql restart
And saw the following:
Stopping mysql database server: mysqld.
Starting mysql database server: mysqld. Checking for corrupt, not cleanly closed and upgrade needing tables..
After that the mysql service started working, but later I saw errors on my website and realized that InnoDB engine was not started.
In /var/log/daemon.log I saw the following lines:
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 67108864 bytes!
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
I deleted the log files and restarted mysql, but that's not the question.
The question is:
How can I know there were errors on starting mysql without looking into daemon.log file? Maybe it's possible to setup printing mysql startup errors to stdout?