2

I have an issue with MySQL. Although it looks like MySQL is able to start on my server:

service mysql start
Starting MariaDB.190930 03:56:09 mysqld_safe Logging to '/var/log/mysqld.log'.
190930 03:56:09 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
..                                                         [  OK  ]

But when I am running:

service mysql status
MariaDB is not running, but PID file exists                [FAILED]

I tried:

  • rm -rf /var/lock/subsys/mysql
  • removed the pid
  • removed mysql.sock

None of those helped me.

I know there are many threads regarding the topic but those didn’t help me.

I don’t see log errors in the MySQL log files:

190930  3:56:11 [Note] Plugin 'FEEDBACK' is disabled.
190930  3:56:11 [Note] Server socket created on IP: '0.0.0.0'.
190930  3:56:11 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.62-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server

2 Answers 2

4

I have the same issue and I found a workaround. In my case I'm using the mysql.server startscript, installed through homebrew. In my case if I start the server using mysql.server start, it's working fine either. But using status or stop won't work with the same exception as yours. The fix is to use the parameter --user. Eg. mysql.server status --user=[my_current_user].

Hope this helps

0

I was facing errors when trying to run MariaDB server's status and stop commands. ERROR! MariaDB is not running, but PID file exists

On Mac OS Big Sur with brew MariaDB 10.4, the following methods fixed the issue:

  1. Start the server by running command:

sudo mysql.server start

  1. Then, get the status by running command: sudo mysql.server status --user=root

  2. And, stop the server by running command: sudo mysql.server status --user=root

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .