My phpmyadmin was working fine, But suddenly I get the error while I try to login in phpmyadmin enter image description here

Than I test mysql on CLI by typing sudo service mysql start and got error Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.

the log file /etc/var/log/mysql/error.log showing this

2017-06-22T07:33:14.316527Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2017-06-22T07:33:14.316562Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2017-06-22T07:33:14.316577Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2017-06-22T07:33:14.917014Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2017-06-22T07:33:14.917060Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-06-22T07:33:14.917073Z 0 [ERROR] Failed to initialize plugins.
2017-06-22T07:33:14.917082Z 0 [ERROR] Aborting

2017-06-22T07:33:14.917093Z 0 [Note] Binlog end
2017-06-22T07:33:14.917747Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

What to do now?

1 Answer 1


Make sure the permissions on the mysql data directory is owned by the mysql user.

sudo ls -al /var/lib/mysql

Everything in that list should be owned by mysql (except the .. entry which would be owned by root).

If it's not the case, run the following command to fix it:

sudo chown -R mysql: /var/lib/mysql

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.