mysql-server: The server quit without updating PID file

Ryan Schmidt ryandesign at macports.org
Thu Oct 25 16:03:59 UTC 2018


On Oct 25, 2018, at 11:01, Murray Eisenberg wrote:

> On 25 Oct2018, at 11:58 AM, Ryan Schmidt wrote:
>> 
>> 
>> On Oct 25, 2018, at 10:34, Murray Eisenberg wrote:
>> 
>>> Such searches give different instructions on what permissions to give the mysql datadir !
>>> 
>>> If the datadir is 
>>> 
>>> 	/Users/me/Databases/mysql/data
>>> 
>>> (and my.cnf includes "datadir = /Users/murray/Databases/mysql/data”, of course),
>>> then who should be the owner and what should the permissions be on that directory?
>>> 
>>> I see all sorts of answers to that, from various mysql versions, or of varying vintage, or on various platforms, or on native /usr/… vs. /opt/.. (latter being MacPorts) configurations — which is leading me to total confusion.
>>> 
>>> Exactly what chown and chmod commands should be used on the datadir? (Even the official MySQL docs are incomplete on this.)
>> 
>> I would imagine that the data directory should be owned by the user account that runs the MySQL server. Assuming you are using the mysql57-server port and are using "sudo port load" to start that server, and you are on Mac OS X 10.5 or later, the name of the user account is _mysql.
>> 
>> It has been a long time since I've dealt with MySQL. You might check the wiki page for guidance: https://trac.macports.org/wiki/howto/MySQL
> 
> I _did_ looke at that macports page first! It does not deal directly with having datadir at a non-default location and merely links to a stackoverflow page that also doesn’t answer the question.

I just mentioned it because it does show some chown commands for setting the ownership of the MySQL directories in their default locations; if you've used other locations then you'll have to chown them there.

If you have the data directory in your home directory, you may additionally have to open up the permissions of your home directory; by default, other users, including the _mysql user, probably aren't allowed to look in your home directory.



More information about the macports-users mailing list