basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
datadir=/usr/local/mysql/data
Alternatively above entries can also be put in /etc/my.cnf file too. Better place to put this instead of modifying packaged/default startup script - /usr/local/mysql/support-files/mysql.server. Anyway its individual choice.
Now try to start the server by clicking Start MySQL Server button in MySQL System Preference pane. I could start the server and can create a new server instance using MySQL Workbench. I was a happy man. But my happiness did not end long. As soon as I restarted my laptop, I got an annoying alert...
Insecure Startup Item disabled. “/Library/StartupItems/MySQLCOM” has not been started because it does not have the proper security settings.
This was because an entry in /etc/hostconfig as MYSQLCOM=-NO-. Due to ownership issue on startup item MySQLCOM, above alert was flashing on OS startup. To fix this just change the ownership of MySQLCOM startup item as shown below
sudo chown -R root:wheel /Library/StartupItems/MySQLCOM
To test just logoff or restart the system and that Insecure Startup Item disabled alert should not come again. Cheers !!!
- Jay


Jay,
ReplyDeletethanks for taking the time to post your experiences - I have been having the same problem. However, I simply cannot find the file mysql.server - where is it located?
Glad that it helped. You can find mysql.server under /usr/local/mysql/support-files directory. I'll update the article to have this location. Thanks for your comment.
ReplyDeleteThanks so much!
ReplyDeleteTHANK YOU!!!! The "insecure startup item" was driving me nuts!
ReplyDeleteI really don't understand:
a) how the folks at MySQL blew it so bad when creating the Mac installer
b) why they have been unresponsive to the bug reports I've filed on this
This is no small thing, and I'd have thought they'd be all over it.
thanks a lot - i even tried reinstalling mysql last night before i came across your entry today! - Fortunately it was my home machine not my production machine that went belly up because of the update. At this point I'd really appreciate if apple came up with their own mamp like system that's easier to maintain and configure on osx client.
ReplyDeleteHuge help to me, too. Thanks Jay.
ReplyDeleteYou can also add a my.cnf in folder ect with:
ReplyDeletebasedir=/usr/local/mysql
datadir=/usr/local/mysql/data
--Frank
Thank you soooo much. This problem was driving me nuts the whole day.
ReplyDeleteGreetings from Austria,
Hannes
great! Thanks.
ReplyDelete@ Frank, thanks for pointing out my.cnf. I guess its better place to put this instead of default startup script. I'll update the article accordingly.
ReplyDeleteThe above and several other posts online regarding this still didn't get mysql working for me. If anyone else is still having problems after trying the above, see
ReplyDeletehttp://blog.salientdigital.com/2010/12/31/mysql-wont-start-on-snow-leopard/
Nutshell:
sudo mysqld_safe -u root
I found the file, but could only open it with TextEdit in order to add the code. However it wouldn't let me save it even though I have permissions. What app should be used?
ReplyDelete@ Liam you can open it using vi from terminal. just enter "sudo vi /usr/local/mysql/support-files/mysql.server" (without quotes).
ReplyDeleteYou can also create my.cnf file under /etc directory. Since you have created it you can edit/save it without sudo permission
Thanks!
ReplyDeleteThis was a fantastic post! Really appreciate it! Worked for me!
ReplyDeleteThanks Jay, you're a lifesaver. :-)
ReplyDeleteLegend Jay...many thanks!
ReplyDeleteThank you, thank you, thank you and thank you.
ReplyDeleteThis was great. Thank you.
ReplyDeleteThanks for posting this! The MySQL manual was no help at all...you are a lifesaver
ReplyDeleteamazing, thanks a lot, it solved my problem !
ReplyDeletethanks, i spent hours with solutions from other posts but this is the only solution that works!
ReplyDeleteThanks you Sir! dreadful mysql install on a MAC
ReplyDeleteThank you, this enabled me to start my 5.5.8 server. I noticed your user feedback on http://dev.mysql.com/, read your blog, noticed the absence of the basedir and datadir values in my own installation, and fixed it through your advice.
ReplyDeleteThanks a lot!
ReplyDeleteThanks for the information , now MySQLServer is working fine . . .
ReplyDeleteI installed mysql-5.5.8 on Mac OSX 10.6.6 , have the exactly the same problems :)
Cheers from México !!
Thanks a lot for the information but i face an error when i try changing the MySQLCOM file. After typing in the command in terminal it asks me for my password and then i receive an error message saying
ReplyDelete"chown: /Library/StartupItems/MySQLCOM: no such file or directory"
@ Ashish, have you installed MySQLStartupItem.pkg after installing mysql-5.5.8-osx10.6-x86_64.pkg?
ReplyDeletedid that....it works now! thanks once again! :D
ReplyDeleteAshish tayal
When trying to start the mysql server, its giving me this error
ReplyDelete"ERROR! The server quit without updating PID file ..."
ne solution?
@ ChinmaY, no idea on this error, but a quick goole gave this links. May be useful
ReplyDeletehttp://icesquare.com/wordpress/starting-mysql-error-the-server-quit-without-updating-pid-file/
http://icesquare.com/wordpress/mysql-starting-mysql-error-the-server-quit-without-updating-pid-file/
When i start mysql it shows the error window? If i use mysqld.exe it tells that could not connect to localhost?
ReplyDeletemany thanks!
ReplyDeleteworks. thanks
ReplyDeleteThe "MySQL System Preference pane" that comes with the 64bit package of MySQL 5.5.9 does not work on intel-based macs :(
ReplyDeleteI installed only the prefpane from MySQL 5.1.51 and it's all sorted...
Anyone knows the remedy for this prefpane of 5.5.9?
Thanks heaps, solved the problem :)
ReplyDeleteJay,
ReplyDeleteIm not familiar with terminal. can u post a detail to solve this problem
best regards
Hazwan
Hazwan, terminal is like command prompt in windows. You can find Terminal.app under /Applications/Utilities directory
ReplyDeleteJay,
ReplyDeleteYup i know that. the problem here. the guideline is quite blur. I still in learning process in using terminal. I'm not quite familiar with it. Can u show me detail guideline to solve this problem. sharing is caring. ^^ tq for reply my comment
Hazwan, not sure exactly which part is "blur" if you can be specific I can try to clear your doubt...
ReplyDeleteThanks, Jay! I have been having a variety or problems since installing this version of MySQL and your post solved this one for me. Now if could only figure out why it won't let me delete the 'test' db… :-)
ReplyDelete@ neo, glad that this post helped you. Regarding deleting test db using mysqladmin remove the test db (mysqladmin drop test). You might get following error
ReplyDeleteerror: 'Error dropping database (can't rmdir './test/', errno: 17)'
This because mysqladmin could not delete the data dir of your test schema. Go to /usr/local/mysql/data directory and remove the directory test and you should be fine.
Word of caution, Above operation will delete all tables and any objects you have created. So before performing any of above, make sure you dont have any of your data.
Quite helpful good chap.
ReplyDeleteVery helpful!!! thank you!
ReplyDeleteThis was a good post. For me, I used fink to install MySQL and needed to use the below in the my.cnf and mysql-server files
ReplyDeletebasedir=/sw
datadir=/sw/var/mysql
and also create links (ln -s) to setup the default looking paths that the panel looks for.
ln- s /sw /usr/local/mysql
ln -s /sw/share/mysql /usr/local/mysql/support-files
Thanks Jacob
ReplyDeleteThanks -- It is very concise, clear & helpful.
ReplyDeleteDavid Chhetri
Thanks David Chhetri
ReplyDeleteActually it doesn't help for me.. In mysql/data just files with name mysql-bin.000001, mysql-bin.000002 etc creates. What's wrong? *note* Should you just put "basedir=/usr/local/mysql ** datadir=/usr/local/mysql/data" anywhere in my.cnf?
ReplyDeleteNicolas, I'm not sure what exactly wrong with your installation. A quick google landed me to this link. Hope this helps you http://bugs.mysql.com/bug.php?id=60660
DeleteThanks, but they didn't come up with any solution there
DeleteAh, I thought at the last there is a summary of what that guy did and it resolved. Anyway if you find the solution then please let me know by posting a comment so it can be useful to me and others visiting this post. All the best.
DeleteI solved it! I followed along the last steps of this http://blog.mclaughlinsoftware.com/2011/02/10/mac-os-x-mysql-install/ and it worked!
Deletewonderful information, I had come to know about your blog from my friend nandu , hyderabad,i have read atleast 7 posts of yours by now, and let me tell you, your website gives the best and the most interesting information. This is just the kind of information that i had been looking for, i'm already your rss reader now and i would regularly watch out for the new posts, once again hats off to you! Thanks a ton once again, Regards, MySql online trainingamong the MySql in Hyderabad. Classroom Training in Hyderabad India
ReplyDelete