MySQL on a Mac: What a headache
MySQL on a Mac: What a headache
I have spent a stupid amount of time trying to get MySQL installed/configured/working on my Mac. Since I am coming from Ubuntu, I am used to being able to install an entire LAMPs stack with this one command:
$ sudo apt-get install apache2 mysql-server php5 libapache2-mod-php5 php5-xsl php5-gd php-pear libapache2-mod-auth-mysql php5-mysql
Apparently on a Mac this is a complete PITA…
After spending hours installing and uninstalling MySQL with the final result being the dreaded error:
> Starting mysqld daemon with databases from /usr/local/mysql/data
> STOPPING server from pid file /usr/local/mysql/data/will-stevenss-macbook-pro.local.pid
> 080613 11:18:38 mysqld ended
I finally ran into this article which has finally gotten me totally set up. Thanks Guys…
Notes:
Since you can have multiple MySQL installs (4 and 5) with Macports; when you
issue commands such as mysql
, you need to specify the version, so you would
use mysql5
.
The command that is specified for starting the MySQL server at startup did not work for me because it was the wrong path. Here is the command I used:
$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist