我为 DigitalOcean 托管的 WordPress 网站建立数据库连接时出错
。所以我检查了数据库出了什么问题。
sudo/etc/init.d/mysql restart
返回
stop: Unknown instance:
start: Job failed to start
df -h/
返回以下内容,因此磁盘未满?
Filesystem Size Used Avail Use% Mounted on
/dev/disk/by-label/DOROOT 20G 12G 6.9G 63% /
sudo -u mysql mysqld
返回
170828 4:33:48 [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.
170828 4:33:48 [Note] mysqld (mysqld 5.5.52-0ubuntu0.14.04.1) starting as process 18825 ...
mysqld
返回
170828 4:34:17 [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.
170828 4:34:17 [Note] mysqld (mysqld 5.5.52-0ubuntu0.14.04.1) starting as process 18866 ...
170828 4:34:17 [Warning] Can't create test file /var/lib/mysql/chengtie.lower-test
170828 4:34:17 [Warning] Can't create test file /var/lib/mysql/chengtie.lower-test
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13)
170828 4:34:17 [ERROR] Aborting
170828 4:34:17 [Note] mysqld: Shutdown complete
有谁知道mysql出了什么问题吗?我怎样才能重新启动它?
编辑 1: 我注意到 config.inc.php
或 config.sample.inc.php
下没有 /var/lib/mysql/phpmyadmin
。
最佳答案
您看过这篇文章吗:Ubuntu - 12.04 - MySql won't start by using service mysql start
您可以尝试
mysqld --verbose获取更多信息
关于mysql - 无法重新启动mysql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45914888/