错误:无法启动 MySQL 服务器:mysqld:无法读取“/etc/mysql/conf.d/”的目录(错误代码:13 - 权限被拒绝)

错误:无法启动 MySQL 服务器:mysqld:无法读取“/etc/mysql/conf.d/”的目录(错误代码:13 - 权限被拒绝)

我尝试通过执行 sudo apt-get install mysql-server 在 ubuntu 中安装 mysql 5.7,但是出现错误:

ERROR: Unable to start MySQL server:
mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 13 - Permission denied)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing common upgrade issues.
Once the problem is resolved, run apt-get --fix-broken install to retry.
dpkg: error processing package mysql-server-5.7 (--configure):
installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for libc-bin (2.27-0ubuntu2) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu6) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

我已经授予错误使用中指定的文件的权限chmod 777,但错误仍然存​​在。我该怎么办?

相关内容