MySQL running in safe mode but not in normal mode. Can’t find file: ‘./thesql/plugin.frm’ (errno: 13)

MySQL

My server accidentally got hard rebooted yesterday and after that the MySQL service isn't starting.

On running sudo service mysql status

the response was stuck at mysql stop/waiting

On running mysqld --verbose this is the response I got

200305 12:47:59 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.

200305 12:47:59 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.

200305 12:47:59 [Note] mysqld (mysqld 5.5.47-0ubuntu0.14.04.1-log) starting as process 2536 ...

200305 12:47:59 [Warning] Can't create test file /var/lib/mysql/ip-172-31-12-215.lower-test

200305 12:47:59 [Warning] Can't create test file /var/lib/mysql/ip-172-31-12-215.lower-test

200305 12:47:59 [Warning] One can only use the --user switch if running as root



200305 12:47:59 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.

200305 12:47:59 [Note] Plugin 'FEDERATED' is disabled.

mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)

200305 12:47:59 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

200305 12:47:59 InnoDB: The InnoDB memory heap is disabled

200305 12:47:59 InnoDB: Mutexes and rw_locks use GCC atomic builtins

200305 12:47:59 InnoDB: Compressed tables use zlib 1.2.8

200305 12:47:59 InnoDB: Using Linux native AIO

200305 12:47:59 InnoDB: Initializing buffer pool, size = 1.0G

200305 12:47:59 InnoDB: Completed initialization of buffer pool

200305 12:47:59  InnoDB: Operating system error number 13 in a file operation.

InnoDB: The error means mysqld does not have the access rights to

InnoDB: the directory.

InnoDB: File name ./ibdata1

InnoDB: File operation call: 'open'.

InnoDB: Cannot continue operation.

Currently I can run mysql in safe mode but I'm not sure if there are any issue's in doing that and since this is in production I can't play around with different solutions which would lead to a longer downtime.

TIA

Best Answer

Welcome.

  1. Please do not use mysql in safe mode.
  2. As it crashed at one point and after which it did not start, it is better to look at log files of that time rather than --verbose.
  3. Most probably (since you report a missing file too), you could try re-installing.

But try with Item 2. If you do not understand please post the log (of that time) here to discuss further.