I was going to add something to my php.ini file so I added it and rebooted the server. My site went down after the reboot citing that it could not connect to the database so I reversed the changes and rebooted again but nothing changed.
I have been debugging for a while and so I have narrowed it down to the local instance of mysql running on the server has a problem
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2023-04-17 17:10:27 UTC; 11min ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 2154 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 2205 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 2205 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Error: 13 (Permission denied)
then I dug further into the log file for mysql:
2023-04-17T16:16:42.385405Z 0 [ERROR] [MY-012592] [InnoDB] Operating system error number 13 in a file operation.
2023-04-17T16:16:42.385446Z 0 [ERROR] [MY-012595] [InnoDB] The error means mysqld does not have the access rights to the directory.
I am using a digitalocean droplet for this site, anyone know which directory or something needs access rights and/or what the command is to fix it?