Apple’s Worldwide Developers Conference returns June 10, 2024

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

MySQL Service Startup Issues

Hi there,

I am a bit of a newbie to Mac Server setup, but have quite a bit of experience with MySQL on Windows platforms and am looking for a bit of help.

I have recently purchased a Mac mini server and am trying to get MySQL up and running. I activated the MySQL service by checking the box under Services in the Server Admin utility. I changed the setting to reset the root password and set the DB location as /Volumes/Storage/DB. Now I have a situation where the MySQL service won't start. Each minute it tries and logs this:

091105 13:56:44 [Warning] Setting lower case_tablenames=2 because file system for /Volumes/Macintosh HD2/ServiceData/MySQL/ is case insensitive
/usr/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)
091105 13:56:44 [ERROR] Aborting

I've seen similar issues in another thread, but there were significant differences and the solutions there don't help me.

You help would be appreciated! Thanks.

Mac Mini Server, Mac OS X (10.6.1)

Posted on Nov 5, 2009 5:59 AM

Reply
Question marked as Best reply

Posted on Nov 5, 2009 9:04 PM

Have you made sure the mysql user has proper access to that directory? Show us the output of:

ls -al "/Volumes/Macintosh HD2/ServiceData/MySQL/"


Also, I think someone had similar trouble in another thread and it was due to the space in the hard drive name, but I'd verify the permissions first.
6 replies
Question marked as Best reply

Nov 5, 2009 9:04 PM in response to dflek

Have you made sure the mysql user has proper access to that directory? Show us the output of:

ls -al "/Volumes/Macintosh HD2/ServiceData/MySQL/"


Also, I think someone had similar trouble in another thread and it was due to the space in the hard drive name, but I'd verify the permissions first.

Nov 12, 2009 5:48 PM in response to dflek

Hi,

I recently had a bit of a fight myself trying to get MySQL up and running on a new Mac mini with Snow Leopard Server using the second disk. After trawling through log files and scripts, the way I got round it was to install the service by ticking the checkbox in Services but DON'T start the MySQL service at this point, instead drop into a Terminal command prompt and do ...

cd /Volumes/Macintosh\ HD2/ServiceData/MySQL
sudo /usr/bin/mysql installdb --user=_mysql --datadir=.

This installs the default database into the '.' directory (i.e. the current one set by the previous 'cd' command, which is the relevant place on the second disk).

So long as that runs without error, THEN start the MySQL server and check the log file, everything should be running ok.

Incidentally, as I'd already tried to install it using Server Admin I found myself in a situation were the MySQL process was constantly trying to start and failing and I couldn't stop it without a reboot so to stop that and clean up a bit before running the above install script, again in a Terminal command prompt I did 'sudo serveradmin stop mysql' and then removed all the files using Finder in the 'Macintosh HD2/ServiceData/MySQL' folder. Don't delete the 'MySQL' folder it's self just the files in there.

Mark

Nov 15, 2009 11:23 AM in response to dflek

I got myself into a jam with the same setup--new Mac Mini with Snow Leopard Server pre-installed. I started MySQL, and changed the root password within a few seconds of each other (not sure in what order) and got MySQL into a permanent "Starting..." state. I couldn't stop the service, even from the command line. Even after rebooting, it would still be "Starting...". The service log showed that it was attempting to start every minute or so and failing. I also couldn't disable the service.

The reason is that the database location, of course, can't have a space in it, but I couldn't get the database location setting to change in the startup script for the service, even though Server Admin showed it as changed. Server Admin will let you edit the database location and save it. However, it will not commit the new setting to the launch script if the service is in the "Starting..." state. It also won't let you disable the service when it is in the "Starting..." state. Essentially, the Server Admin GUI and the serveradmin command line application have the appearance of working, but don't do anything when the service is in the "Starting..." state.

I resolved this by editing the database location in the mysql service's LaunchDemon plist file, unloading the file, recursively deleting all files in the database location, re-saving the database location in Server Admin, and then re-enabling and starting the service.

You can edit the plist file here:
/System/Library/LaunchDaemons/org.mysql.mysqld.plist

You can unload the service with this command:
sudo launchctl unload /System/Library/LaunchDaemons/org.mysql.mysqld.plist

MySQL Service Startup Issues

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.