Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when starting mariadb - no such process

I installed mariadb via homebrew to set up a wordpress enviroment. It is meant to work with laravel valet. I am currently using using the zsh shell.

I installed it without a problem (10.3.12), but when I run mysql.server start I get the following error:

mysql.server start
Starting MariaDB
.190206 11:26:18 mysqld_safe Logging to '/usr/local/var/mysql/chriss-mbp.lan.err'.
190206 11:26:18 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
/usr/local/bin/mysql.server: line 260: kill: (55179) - No such process
 ERROR!

Can anybody help me narrow down why I'm getting this error? I'm new to terminal and mariadb, so I'm hoping it's just a silly error that I wasn't aware of.

like image 516
Chris Shaugh Avatar asked Feb 06 '19 18:02

Chris Shaugh


2 Answers

Looking at the offending line in the startup script, this error indicates:

  1. the startup script timed out waiting for the server to come up, and
  2. the server process isn't running.

The command name kill is a little misleading; it's most commonly used to kill a process, but it can also be used to send an arbitrary signal, or even (with -0) just to check whether it would be possible to send a signal, which is what's happening here.

To find out why the server didn't come up, you need to check the error log, which on a macOS / Homebrew installation of MySQL or MariaDB is going to be in:

/usr/local/var/mysql/<hostname>.err

If you tail that file, you should see the reason for the failure, e.g.

2019-11-01 11:29:14 0 [ERROR] Can't start server: Bind on TCP/IP port.
  Got error: 48: Address already in use
2019-11-01 11:29:14 0 [ERROR] Do you already have another mysqld server
  running on port: 3306 ?
2019-11-01 11:29:14 0 [ERROR] Aborting

(In my case I had another instance of MariaDB running in a Docker container and squatting on port 3306.)

like image 139
David Moles Avatar answered Oct 18 '22 18:10

David Moles


Brew has its own service manager included. Via brew services list you get all installed services listed. MariaDB should be there.

To start it call brew services start mariadb.

like image 27
common sense Avatar answered Oct 18 '22 18:10

common sense