MySql 无法启动

MySql 无法启动

“嗨,我最近在 DigitalOcean 上安装了 MySql。

由于某种原因,我无法启动 MySql。

141003 07:25:17 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141003 07:28:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141003  7:28:53 [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.
141003  7:28:53 [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.
141003  7:28:53 [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.
141003  7:28:53 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'plugin' is read only
141003  7:28:53 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
141003  7:28:53 InnoDB: The InnoDB memory heap is disabled
141003  7:28:53 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141003  7:28:53 InnoDB: Compressed tables use zlib 1.2.8
141003  7:28:53 InnoDB: Using Linux native AIO
/usr/sbin/mysqld: Can't create/write to file '/tmp/ib2UuPLv' (Errcode: 13)
141003  7:28:53  InnoDB: Error: unable to create temporary file; errno: 13
141003  7:28:53 [ERROR] Plugin 'InnoDB' init function returned error.
141003  7:28:53 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
/usr/sbin/mysqld: File '/var/log/mysql/mysql-slow.log' not found (Errcode: 13)
141003  7:28:53 [ERROR] Could not use /var/log/mysql/mysql-slow.log for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.
141003  7:28:53 [ERROR] Unknown/unsupported storage engine: InnoDB
141003  7:28:53 [ERROR] Aborting

141003  7:28:53 [Note] /usr/sbin/mysqld: Shutdown complete

我已经尝试过 mysqlupgrade,但是它不起作用,因为 mysql 没有运行。

答案1

这不是“出于某种原因”,错误很明显地说明了发生了什么。您有权限问题,因为 MySQL 无法读取 InnoDB 日志文件或创建临时文件。

要么是 mysql 设置了错误的用户名,要么是有人在文件系统的大部分区域上使用 chmod/chown 时出了问题。

相关内容