Skip to main content

MariaDB The service “mysql” appears to be down but it isn't

Comments

10 comments

  • andrew.n
    Michael, see the startup log. The error is this: /usr/bin/mysqld_safe: line 616: /xxxxxx.err: Permission denied You need to fix the permission on the log files. It's probably not owned by mysql user.
    0
  • cPanelLauren
    So, when you switch to MariaDB you would still run /scripts/restartsrv_mysql and it should restart MariaDB but in this instance, it looks like it's actually attempting to start MySQL. On my server with MariaDB: [root@server dev]# /scripts/restartsrv_mysql Waiting for "mysql" to restart ""waiting for "mysql" to initialize "finished. Service Status mariadb (/usr/sbin/mysqld) is running as mysql with PID 9657 (systemd+/proc check method). Startup Log Oct 23 13:14:11 server.myhostname.us systemd[1]: Starting MariaDB 10.3.25 database server... Oct 23 13:14:11 server.myhostname.us mysqld[9657]: 2020-10-23 13:14:11 0 [Note] /usr/sbin/mysqld (mysqld 10.3.25-MariaDB) starting as process 9657 ... Oct 23 13:14:11 server.myhostname.us systemd[1]: Started MariaDB 10.3.25 database server. mysql restarted successfully.
    Note specifically in the log messages it notes that it indicates MariaDB as the Database Server. This seems to indicate that there are some changes/customizations that have occurred on the server. I'd suggest you open a ticket if this issue is still occurring to have this investigated further.
    0
  • Michael Legg
    Thanks Lauren. Before I open a ticket, there are 2 factors that may have a bearing: (1) The MariaDB server is remote not local. (2) The MariaDB logs are encrypted. Is there something special I need to do to enable cPanel to cope with this situation?
    0
  • andrew.n
    cPanel is trying to start the local MariaDB server so if you are using a remote one then you are troubleshooting the wrong one?!
    0
  • Michael Legg
    Why is cPanel trying to start MySQL on the local server when it knows it's remote? And how do I stop cPanel from doing this?
    0
  • grabyourhosting
    I had the same issue. Try removing the following lines on your my.cnf file. [mysql_safe] and the lines below them. Restart MYSQL Right after.
    0
  • andrew.n
    You can add multiple remote hosts to the server and it actually doesn't mean that you can't have a locally running SQL server as well. If you want to get this disable you can do so under Service Manager and you won't get notification about that anymore.
    0
  • Michael Legg
    You can add multiple remote hosts to the server and it actually doesn't mean that you can't have a locally running SQL server as well. If you want to get this disable you can do so under Service Manager and you won't get notification about that anymore.

    I've disabled database monitoring under Service Manager, so the emails have stopped. but it would be better if cPanel could monitor remote database servers. I've also noticed cPanel is unable to upgrade remote database servers, so you lose a lot of functionality when you choose to run your database on a separate server.
    0
  • Michael Legg
    Michael, see the startup log. The error is this: /usr/bin/mysqld_safe: line 616: /xxxxxx.err: Permission denied You need to fix the permission on the log files. It's probably not owned by mysql user.

    line 616 of /usr/bin/mysqld_safe: points to a variable called $err_log, but I can't find where the variable is set in that script, so I don't know what file to give it ownership of.
    0
  • andrew.n
    cPanel doesn't have a way to access the remote server hence it can't offer such functionality. The error log file is specified in /etc/my.cnf but the error message says where the .err is located.
    0

Please sign in to leave a comment.