Michael Legg

Well-Known Member
Mar 2, 2015
66
4
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
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.

Code:
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?
 

ankeshanand

Well-Known Member
Mar 29, 2021
66
15
8
India
cPanel Access Level
Root Administrator
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.

Code:
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:
Code:
# 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!
 

Michael Legg

Well-Known Member
Mar 2, 2015
66
4
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
It seems the Permission denied for MySQL configuration.
Try:
Code:
# 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)
 

ankeshanand

Well-Known Member
Mar 29, 2021
66
15
8
India
cPanel Access Level
Root Administrator
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 everything
 

Michael Legg

Well-Known Member
Mar 2, 2015
66
4
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
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.
 
  • Like
Reactions: cPRex