My mysql server doesn't start it gives an error 13 (Permission denied)
i just changed the mysql data directory (to be honest I am not sure if I did that correctly)
I have made sure the new directory has mysql as its group and owner
systemctl status 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.
and the new configuration
cat /etc/mysql/conf.d/local_configs.cnf:
[mysqld]
datadir=/mnt/HC_Volume_13969265/mysql-data
directory permissions:
drwxr-xr-x 13 mysql mysql 12288 Oct 7 18:41 mysql-data