MYSQL Initial Installation

Download and install the MySql DMG Archive package from MySQL Community Serve.

Set the path to your mysql via terminal by writing it to your profile file. Quit and reopen terminal to take effect.

echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.profile

Download and installa mysql config file my.cnf and a launchd start-up file net.captainnet.mysql.plist
pkg mysql-start.pkg

Create folder for mysql socket (as "root" from your terminal):

login root
cd /var
mkdir mysql
sudo chown -R mysql mysql
sudo chmod 775 mysql

Via terminal start mysql.

sudo launchctl load /Library/LaunchDaemons/net.captainnet.mysql.plist

How to handle the temp password provided by mysql installer. Log in to mysql, when asked for password, type or copy in the temporary password generated by MySql installer. (terminal open as user)

mysql -u root -p

In this line of command type in the password you want to use for "root" user and then quit.


At this point your should be able to log in as root with your new password through phpMyAdmin. http://localhost/phpMyAdmin/

Start/restart mysql

sudo launchctl unload /Library/LaunchDaemons/net.captainnet.mysql.plist; sleep 1; launchctl load /Library/LaunchDaemons/net.captainnet.mysql.plist

And here is instruction on how to upgrade MySql.