0

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

Shadow
  • 33,525
  • 10
  • 51
  • 64
Akash Popat
  • 420
  • 3
  • 18
  • does this help? https://stackoverflow.com/questions/3907666/mysql-wont-start-ibdata1-corrupt-operating-system-error-number-13-permis – FanoFN Mar 06 '20 at 08:35
  • This question has nothing to do with programming, this is about administering a mysql instance. While this question is off topic here on SO, you can get more help at the dba sister site of SO. – Shadow Mar 06 '20 at 08:56

1 Answers1

0

You seems to have upgraded your MySQL server and forgot to run mysql_upgrade and this is what the error says in your error log.

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

in your terminal just run with sudo if needed :

mysql_upgrade
ROOT
  • 11,363
  • 5
  • 30
  • 45