Yay! Its finally here! The newest version of my favorite operating system. And it comes with 98% of my dev stack ALREADY installed! Yay! This is perfect.
Wait.. ok, no MySql. Thats ok, I'll just install it...Wait.. why isn't it running...why isn't this stupid preference panel turning it on!!!! ARGHHH!
Ok, that may have just happened to you, and you dramatically hit the Google looking for answers. So answers I give you.
If you want to start MySql in Leopard, you need to call the startup item directly from the command line:
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
And to stop it:
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
Not so bad. But long... So make an alias in your .bash_profile
alias start_mysql="/Library/StartupItems/MySQLCOM/MySQLCOM start"
alias stop_mysql="/Library/StartupItems/MySQLCOM/MySQLCOM stop"
Happier? Relaxed? Good.
Popularity: 51% [?]





About
Mmm, Del.icio.us
Rock on! Thanks!!
Having the exact same problem. Thanks for the answer!
Thanks for being so quick to post this. Noobs like myself thank you.
I also had the same problem, surfing on the web I found a site in which they suggested to change the permissions of the MySQL directory (I did both the data and the main MySQL directory) by setting it with chmod 777. I had to restart the machine but thereafter I was able to start and stop MySQL with the control panel.
I was not able, however, to acess MySQL with phpMyAdmin, it says that the socket is badly configured, I don't know what it means and I am investigating... Other clients work.
I am using version 5.1 of MySQL.
Hope this helps!
PHP on Leopard is looking for mysql.sock to be at /var/mysq/mysql.sock. But the mysql installer puts it at /tmp/mysql.sock. So you need to symlink it.
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
Migrating MySQL 5.0.45 to Mac OS X 10.5 Leopard
http://blog.tomatocheese.com/archives/2007/11/1/migrating_mysql_to_mac_os_x_leopard/
Min terminal says "sudo: /Library/StartupItems/MySQLCOM/MySQLCOM: command not found"
any ideas?
Simon,
If you haven't figured it out already...
try this: sudo: /Library/StartupItems/MySQL/MySQL
(remove the COMs)
Cheers
Simon, did you install MySQLStartupItem.pkg? /Library/StartupItems/MySQLCOM/MySQLCOM is installed by this package. Check that the file exists. If so, try:
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
(note there is no colon after sudo)
It is there, and now it works, but I'm trying to install WordPress, but it can't connect to MySQL. I never had a problem with Mac OS X 10.4, but since I got 10.5, I can't do anything. I can't even logon using PHPMyAdmin. Argh... so fustrating
Had this problem. Thanks for the tip on the fix.
Saved me a lot of hassle.
sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart
also works...
I'm using the command given above to start MySQL (sudo /Library/StartupItems/MySQLCOM/MySQLCOM start) and it appears to work fine, prompting me for a password. But when the command completes (with no feedback), I check the processes to see if MySQL is running (ps -axww). I can't find any mysql processes running.
Does this mean that my start didn't work?
Thanks!
Thanks! This totally helped! nice site by the way....
Shawn
work perfect.
How would you make it into a applescript for easy startup and shutdown?
i try to just type sudo /Library/StartupItems/MySQLCOM/MySQLCOM start in script editor and receive syntax error, can you help ?
Pay Day Loan...
Payday Advance very much will accomodate visitors close to Wyoming stressing large taxes, if folks are near a} interval consisting of financial trauma....
I came across something that might cause a bit of confusion for some, so please let me share.
I never had any directory concerning /Library/StartupItems after installing the startup package. So, I was unable to start/stop/restart from there.
I did find it here:
/usr/local/MySQLCOM
This is for OS X 10.4.11
Hope it helps!
Can I just tell you, I love you!!!!
Yes, I can relax now!!!! :)
I got the same problem, i found this nice mini-tutorial and than i found that all was in ReadMe.txt ...
Thanks anyway
I downloaded http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg and ran it.
I installed the server and its running fine.
I then installed the StartupItem that came in the package. It says it installed fine but there is nothing under /Library/StartupItems which sucks.
I posted a couple of places but haven't heard anything back. I sure would like to automate starting/stopping the server as prescribed here...
I installed the package of MySQL 5.0 and the startupitem package. I too have nothing in /Library/StartupItems. My preference pane will not start the process either. MySQL is not running ( ps aux .. showing nothing related to MySQL after restarting ). Any help?
I also have installed the startup package but there is nothing in /Library/StartupItems.
Startup item does not work for me either :-( does not create anything in Library/StartupItems :-( server can be run from the command line, but the prefPane button does not work: it can only stop a running server.
Same as above, nothing is installed in StartupItems. Trying to install on macbookpro intel 10.5. MySql does not run, and when it does phpmyadmin or joomla cannot see it. Thee must be a flaw in the installer or something.
Well I have an update that might help some.
I had installed the 64bit version (not for macbook pro)
An I was tired of juggling with tons of commands in the terminal.
So I uninstalled EVERYTHING according to this page:
http://forums.mysql.com/read.php?11,71860,72130#msg-72130
then I logged in as ROOT (root user has to be enabled for this)
http://www.abrandom.com/macish/tips/enable_root_user.html
I ran the installer from ROOT user, and guess what, everything runs as expected (Using the preference panel). EXCEPT that now I HAVE to log is as root to start mysql server. I wonder why my account, even if it's administrator, that it cannot do the work.
But at least I can run it.
This is my version:
http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51a-osx10.5-x86.dmg/from/pick#mirrors
hoping it helps someone.
--
Thierry
http://www.8p-design.com/en/internet.php
also for 10.5 the Startup Item for MYSQL is being placed in /usr/local/
the installer for the startup Item is still placing it in /usr/local
Here is what worked for me:
(Macbook Pro, Leopard, MySQL 5.1.23 pkg )
After unpacking the pkg, the preference pane was useless no matter how many times I clicked the button. ( And I did. A lot ) There was nothing in /Library/StartupItems/MySQLCOM/MySQLCOM
This is what ended up working..
Start - sudo /usr/local/mysql/support-files/mysql.server start
Stop - sudo /usr/local/mysql/support-files/mysql.server stop
Important that you run that as root (sudo) otherwise mysql.sock doesn't appear in /tmp/
Good luck.
Thaaaaanx a lot! My problem was that the startup item wasn't at /Library/StartupItems but at /usr/local/MySQLCOM... strange but maybe it happened to someone else.
I have had this problem with starting the MySQL also. Mac OS X 10.5. I managed to get it working last thing, last week but for some reason it wont start this morning and I cant find the command line that started it :(
The "Start MySQL Server" button in SysPref is a waste of time (a bit like those fake draws you get on kitchen sink).
When its running it displays "Start MySQL Server" and when its not running it says Start MySQL Server" but does nothing in both events.
Heres what I've tried:
sudo /Library/StartItems/MySQLCOM/MySQLCOM start
sudo /Library/StartItems/MySQL/MySQL start
sudo /Library/StartItems/MySQLCOM/MySQLCOM restart
sudo /Library/StartItems/MySQL/MySQL restart
sudo /usr/local/MySQLCOM start
sudo /usr/local/MySQLCOM restart
sudo /usr/local/MySQL start
sudo /usr/local/MySQL restart
None seem to work. I'm sure it was one of the above that started it last time. I remember having the MySQL SysPref panel open and typing in the command line and the red "Stopped" flicked to green "Running" and I was off.
I actually stayed late to add all the databases and data while it was running so a reinstall is outa the question.
Any ideas would be great...
Fixed it!!!
Apparently I don't use the StartupItem so instead its:
shell>cd /usr/local/mysql
[press enter]
shell>sudo ./bin/mysqld_safe
[press enter]
Enter Computer Admin password
(Press ctrl-z)
shell>bg
ctrl-d or shell>exit to exit the shell
I was having this problem on Tiger 10.4.11, on my G4. Just solved it by downloading MySql 5.1 and installing the StartupItem package from that build. Works now...
Thank you!
There is now an updated preference pane which works out of the box. Get it here:
ftp://ftp.mysql.com/pub/mysql/download/gui-tools/MySQL.prefPane-leopardfix.zip
Cool tip. Many thnx!
A
Hi, i've done a simply application that supplies to the mysql-panel functions.
I hope you'll find it useful.
For bugs, comments and suggests please visit my site.
Download at: http://preiser.altervista.org/index.php?page=mac&crono=mac
enjoy it =)
What ultimately worked for me was not explicitly stated in this thread so I thought I'd share since I had a whole world of relief when tyhe little green light turned on. This version is very similar to Chris' version but the devil is in the detail:
cd /usr/local/mysql;
./bin/mysqld_safe &
I found this one here: http://www.robbyonrails.com/articles/2007/10/27/starting-mysql-after-upgrading-to-os-x-leopard
Thanks for the tip. Was the first link for Google search "stop mysql os x".
Thanks for the tip! save a lot of time ;-)
I had mysql running for a long time and then I rebooted my machine and I can't get it to start again. I am running Tiger and don't want to upgrade to Leopard. It seems the data is there but the path is to /usr/local/data instead of /Library/MySQL/data.
How do I start mysql pointing to the old data?
Joe.
awesome. thanks!
Hi all
I did my installation on a Mac with xampp.
After some initial tweaking it works fine.
I am now trying to install the Magento shop.
No go so far. At the moment things point to me needing the latest verion of mySQL.
Has anyboy tried to upgrade a xampp installed mySQL?
xampp creates a direcory und Applications and puts everything in there. So the mySQL installers seam not to work for me.
Romano
Thanks for this this post. Saved me a lot of headaches!
hai all,
i had installed Mysql 5.0.45 in mac(Tiger), it works fine the issue is with starting and stopping the Mysql server. As said in the previous post, In my machine i dont find "MySQLCOM/MySQLCOM start" inside "/Library/StartItems/". i had also looked in "/usr/local/" but i dont find "MySQLCOM start". please advise how to restart the Mysql server without restarting the mac machine.
Thanks!