MYSQL Won't Start
It's a long story how I ended up having to do this, but I'm trying to delete our Remote MySQL profile from WHM, but since it's the default, I need to make the local MySQL server the default. (We are still going to actually use the remote db server, it's just that we don't want WHM totry to manage it)
The problem is that the local MySQL server won't start.
vendor preset: disabled seems to be the root cause of why it won't start - how do I set this to enabled?
service mysql status
Redirecting to /bin/systemctl status mysql.service
? mysql.service - MySQL Server
Loaded: loaded (/etc/systemd/system/mysql.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2021-04-26 18:11:31 AEST; 13min ago
Process: 14158 ExecStart=/usr/bin/mysqld_safe (code=exited, status=1/FAILURE)
Main PID: 14158 (code=exited, status=1/FAILURE)
Apr 26 18:11:30 webserver.com systemd[1]: Started MySQL Server.
Apr 26 18:11:31 webserver.com mysqld_safe[14158]: /usr/bin/mysqld_safe: line 616: /webserver.com.err: Permis...enied
Apr 26 18:11:31 webserver.com mysqld_safe[14158]: 210426 18:11:31 mysqld_safe error: log-error set to '/webserver.com...sql'.
Apr 26 18:11:31 webserver.com systemd[1]: mysql.service: main process exited, code=exited, status=1/FAILURE
Apr 26 18:11:31 webserver.com systemd[1]: Unit mysql.service entered failed state.
Apr 26 18:11:31 webserver.com systemd[1]: mysql.service failed.
vendor preset: disabled seems to be the root cause of why it won't start - how do I set this to enabled?
-
Could you please share the output of mysql_error.log? 0 -
It's a long story how I ended up having to do this, but I'm trying to delete our Remote MySQL profile from WHM, but since it's the default, I need to make the local MySQL server the default. (We are still going to actually use the remote db server, it's just that we don't want WHM totry to manage it) The problem is that the local MySQL server won't start.
service mysql status Redirecting to /bin/systemctl status mysql.service ? mysql.service - MySQL Server Loaded: loaded (/etc/systemd/system/mysql.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2021-04-26 18:11:31 AEST; 13min ago Process: 14158 ExecStart=/usr/bin/mysqld_safe (code=exited, status=1/FAILURE) Main PID: 14158 (code=exited, status=1/FAILURE) Apr 26 18:11:30 webserver.com systemd[1]: Started MySQL Server. Apr 26 18:11:31 webserver.com mysqld_safe[14158]: /usr/bin/mysqld_safe: line 616: /webserver.com.err: Permis...enied Apr 26 18:11:31 webserver.com mysqld_safe[14158]: 210426 18:11:31 mysqld_safe error: log-error set to '/webserver.com...sql'. Apr 26 18:11:31 webserver.com systemd[1]: mysql.service: main process exited, code=exited, status=1/FAILURE Apr 26 18:11:31 webserver.com systemd[1]: Unit mysql.service entered failed state. Apr 26 18:11:31 webserver.com systemd[1]: mysql.service failed.
vendor preset: disabled seems to be the root cause of why it won't start - how do I set this to enabled?
It seems the Permission denied for MySQL configuration. Try:# chown mysql:adm /var/log/mysql/error.log # chown mysql:adm /var/log/mysql # chown root:syslog /var/log # chown root:root /var # chmod 0640 /var/log/mysql/error.log # chmod 0750 /var/log/mysql # chmod 0775 /var/log # chmod 0755 /var
Start the Server now to see if it works! If not, Kindly share the Log File raw output!0 -
@ankeshanand - I'm wondering if you mean "/var/lib" instead of "/var/log" in some of those commands, as many of those files don't exist on a cPanel system. @Michael Legg - what do you see in WHM >> Service Manager for the MySQL service? If it is disabled there, it will not start manually. 0 -
It seems the Permission denied for MySQL configuration. Try:
# chown mysql:adm /var/log/mysql/error.log # chown mysql:adm /var/log/mysql # chown root:syslog /var/log # chown root:root /var # chmod 0640 /var/log/mysql/error.log # chmod 0750 /var/log/mysql # chmod 0775 /var/log # chmod 0755 /var
Start the Server now to see if it works! If not, Kindly share the Log File raw output!
Most of those files don't exist. (Under /var/lib or /var/log)0 -
In the file, which according to /etc/my.cnf on the webserver is supposed to be the error log, there is nothing since October last year. 0 -
In the file, which according to /etc/my.cnf on the webserver is supposed to be the error log, there is nothing since October last year.
We do know that We cannot gain Direct Access to your server and so we cannot provide or help with anymore information than that. Best way is to Open a cPanel Support ticket and Allow cPanel Access to your server! I believe that will sort out everything0 -
That's definitely odd if there is nothing in the error log since last year. Even a restart of the service would show up there. If you do get a ticket created we'll be happy to take a look! 0 -
That's definitely odd if there is nothing in the error log since last year. Even a restart of the service would show up there. If you do get a ticket created we'll be happy to take a look!
I've opened a ticket, there's just a delay in getting the company that manages the hardware firewall at the DC to allow access to the cPanel techs.0 -
If you could post the ticket number here I can follow along and make sure this thread stays updated. 0
Please sign in to leave a comment.
Comments
9 comments