How to install mysql on leopard

Author: Bian Linkou
Date: July 16, 2010

1. download mysql-5.1.48-osx10.5-x86.dmg

a. mount the dmg file
        b. install mysql-5.1.48-osx10.5-x86.pkg
c. install MySQLStartupItem.pkg
        d. install MySQL.prefPane

2. environment configuration

cd ~
vi .bash_profile
export PATH=/usr/local/mysql/bin:$PATH
:wq
source .bash_profile #load env config to current terminal session

3. start/stop mysql

A)
sudo mysqld_safe
sudo mysqladmin shutdown

B)
sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop

***add following lines to .bash_profile for convenience

alias start_mysql="/Library/StartupItems/MySQLCOM/MySQLCOM restart"
alias stop_mysql="/Library/StartupItems/MySQLCOM/MySQLCOM stop"

C)
system preference panel

4. install GUI client tool - Sequel Pro

Leopard mysql installation and configuration

Data: November 23, 2009
Author:
Link Bian

To study JavaEE development on my new MacBook Pro, I installed mysql yesterday. While, I find chinese character can not be saved. So I spend some time to investigate the configuration of mysql on leopard and record as follows.

Read more