Started up a litespeed wordpress droplet about a week and a half ago, I restarted the droplet to see if that’s what php ldap wasn’t being recognized and now I’m faced with a “Error establishing a database connection” so I ran “service mysql status” and got:
Jun 18 16:12:06 openlitespeed-wordpress-ubuntu-s-1vcpu-1gb-amd-tor1-01 systemd[1]: Starting MariaDB 10.4.19 database server...
Jun 18 16:12:06 openlitespeed-wordpress-ubuntu-s-1vcpu-1gb-amd-tor1-01 mysqld[2386]: 2021-06-18 16:12:06 0 [Note] /usr/sbin/mysqld (mysqld 10.4.19-MariaDB-1:10.4.19+maria~focal-log) starting as process 2386 ...
Jun 18 16:12:06 openlitespeed-wordpress-ubuntu-s-1vcpu-1gb-amd-tor1-01 mysqld[2386]: 2021-06-18 16:12:06 0 [Warning] Can't create test file /var/lib/mysql/openlitespeed-wordpress-ubuntu-s-1vcpu-1gb-amd-tor1-01.lower-test
Jun 18 16:12:06 openlitespeed-wordpress-ubuntu-s-1vcpu-1gb-amd-tor1-01 mysqld[2386]: 2021-06-18 16:12:06 0 [ERROR] mysqld: File '/var/log/mysql/mariadb-bin.index' not found (Errcode: 13 "Permission denied")
Jun 18 16:12:06 openlitespeed-wordpress-ubuntu-s-1vcpu-1gb-amd-tor1-01 mysqld[2386]: 2021-06-18 16:12:06 0 [ERROR] Aborting
Jun 18 16:12:06 openlitespeed-wordpress-ubuntu-s-1vcpu-1gb-amd-tor1-01 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jun 18 16:12:06 openlitespeed-wordpress-ubuntu-s-1vcpu-1gb-amd-tor1-01 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jun 18 16:12:06 openlitespeed-wordpress-ubuntu-s-1vcpu-1gb-amd-tor1-01 systemd[1]: Failed to start MariaDB 10.4.19 database server.
I don’t remember changing any permissions, but it’s possible a coworker did. Any suggestions?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
Hi there,
The
/var/log/mysql/
folder should be owned by themysql
user I believe.Can you run the following commands to check the permissions of the folder and the files inside the folder:
Feel free to share the output here.
Regards, Bobby