my servers went down because of power failure. Now mysql won't start. I'm getting errors: ● mysql.service - LSB: Start and stop the mysql database server daemon Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2017-08-09 09:38:05 CEST; 4min 15s ago Docs: man:systemd-sysv-generator(8) Process: 1607 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE) Aug 09 09:37:35 pro2 mysqld[1983]: 170809 9:37:35 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist Aug 09 09:37:35 pro2 mysqld[1983]: 170809 9:37:35 [Note] Server socket created on IP: '::'. Aug 09 09:37:35 pro2 mysqld[1983]: 170809 9:37:35 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist Aug 09 09:37:35 pro2 mysqld_safe[2056]: mysqld from pid file /var/run/mysqld/mysqld.pid ended Aug 09 09:38:05 pro2 mysql[1607]: ...fail! Aug 09 09:38:05 pro2 systemd[1]: mysql.service: Control process exited, code=exited status=1 Aug 09 09:38:05 pro2 systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon. Aug 09 09:38:05 pro2 systemd[1]: mysql.service: Unit entered failed state. Aug 09 09:38:05 pro2 systemd[1]: mysql.service: Failed with result 'exit-code'. Aug 09 09:38:05 pro2 systemd[1]: Stopped LSB: Start and stop the mysql database server daemon. The only thing that google found is to delete the mysql and make a new install and this isn't a option for me! The /var/lib/mysql folder and all his subfolders have mysql:mysql permissions.
The database 'mysql' seems to be really damaged when MySQL can't find its user tables anymore. The first step is to make a backup of the whole /var/lib/mysql folder, so in case that you have a backup in case that repair attempts fail so you can retry the repair. Here is an article with steps that you might try: https://www.a2hosting.com/kb/developer-corner/mysql/repairing-mysql-databases-and-tables