In terminal I do:
sudo service mysql start
and I get:
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
systemctl status mysql.service gives me:
● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-10-31 22:05:05 UTC; 4s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 3592 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE) Process: 3542 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 3592 (code=exited, status=1/FAILURE) Status: "SERVER_BOOTING" Error: 13 (Permission denied)Oct 31 22:05:04 brawn systemd[1]: Starting MySQL Community Server... Oct 31 22:05:05 brawn mysqld[3592]: 2018-10-31T22:05:05.104214Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld Oct 31 22:05:05 brawn mysqld[3592]: mysqld: File './binlog.index' not found (OS errno 13 - Permission denied) Oct 31 22:05:05 brawn mysqld[3592]: 2018-10-31T22:05:05.106057Z 0 [ERROR] [MY-010119] [Server] Aborting Oct 31 22:05:05 brawn mysqld[3592]: 2018-10-31T22:05:05.106193Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld Oct 31 22:05:05 brawn systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE Oct 31 22:05:05 brawn systemd[1]: mysql.service: Failed with result 'exit-code'. Oct 31 22:05:05 brawn systemd[1]: Failed to start MySQL Community Server.
and journalctl -xe gives me:
-- Unit mysql.service has begun starting up. Oct 31 22:05:04 brawn audit[3591]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profi Oct 31 22:05:04 brawn kernel: audit: type=1400 audit(1541023504.856:30): apparmor="STATUS" operation="profile_re Oct 31 22:05:05 brawn mysqld[3592]: 2018-10-31T22:05:05.104214Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld Oct 31 22:05:05 brawn mysqld[3592]: mysqld: File './binlog.index' not found (OS errno 13 - Permission denied) Oct 31 22:05:05 brawn mysqld[3592]: 2018-10-31T22:05:05.106057Z 0 [ERROR] [MY-010119] [Server] Aborting Oct 31 22:05:05 brawn mysqld[3592]: 2018-10-31T22:05:05.106193Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld Oct 31 22:05:05 brawn systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE Oct 31 22:05:05 brawn systemd[1]: mysql.service: Failed with result 'exit-code'. Oct 31 22:05:05 brawn systemd[1]: Failed to start MySQL Community Server. -- Subject: Unit mysql.service has failed -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- Unit mysql.service has failed. -- -- The result is RESULT. Oct 31 22:05:05 brawn sudo[3512]: pam_unix(sudo:session): session closed for user root
Im quite new to Ubuntu and MySql, but I believe this issue is that for some reason MySql can no longer access './binlog.index', am I on the right track and how do I fix this?
I did try sudo find / -name binlog.index
which gave me one result:
/var/lib/mysql/binlog.index
But how do I for it? what permission is required?