mysql - Mysql 服务器未启动错误 13 Ubuntu 20.04
问题描述
我的 mysql 服务器没有启动它给出一个错误 13(权限被拒绝)
我刚刚更改了 mysql 数据目录(老实说,我不确定我是否正确地这样做了)
我已确保新目录将 mysql 作为其组和所有者
systemctl状态mysql:
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-10-07 18:54:56 CEST; 6s ago
Process: 1119 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 1127 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 1127 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Error: 13 (Permission denied)
Oct 07 18:54:56 Main systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Oct 07 18:54:56 Main systemd[1]: Stopped MySQL Community Server.
Oct 07 18:54:56 Main systemd[1]: mysql.service: Start request repeated too quickly.
Oct 07 18:54:56 Main systemd[1]: mysql.service: Failed with result 'exit-code'.
Oct 07 18:54:56 Main systemd[1]: Failed to start MySQL Community Server.
和新配置
猫 /etc/mysql/conf.d/local_configs.cnf:
[mysqld]
datadir=/mnt/HC_Volume_13969265/mysql-data
目录权限:
drwxr-xr-x 13 mysql mysql 12288 Oct 7 18:41 mysql-data
解决方案
推荐阅读
- amazon-web-services - PhpMyAdmin(使用 Amazon Linux EC2 + RDS)
- php - 如何在 laravel 中插入网站图标?
- oracle - 在 Oracle 中解析 HTML 表不起作用
- java - Spring MVC Junit 测试注解
- amazon-web-services - .tfstate 中的完整配置有什么意义?
- r - 修复一个函数以运行 x:y 而不是仅 1:y
- mysql - 我已经尝试过任何方法。无法授予超级特权我尝试设置 log_bin_trust_function_creators
- swift - Swift 将 makeConnectable 与 PassthroughSubject 结合起来
- r - 安装 R 包 'statnet.common' 时编译失败
- r - 从 Github 安装 R 包的问题(非零退出状态?)