【发布时间】:2020-06-18 22:54:12
【问题描述】:
我的服务器昨天意外硬重启,之后 MySQL 服务没有启动。
正在运行sudo service mysql status
回复卡在mysql stop/waiting
在运行mysqld --verbose 这是我得到的响应
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.
目前我可以在安全模式下运行 mysql,但我不确定这样做是否有任何问题,因为这是在生产中,我无法使用不同的解决方案,这会导致更长的停机时间。
TIA
【问题讨论】:
-
这个问题与编程无关,这是关于管理一个mysql实例。虽然这个问题在 SO 上不是主题,但您可以在 SO 的 dba 姊妹站点获得更多帮助。
标签: mysql