installing MySQL
Since MySQL is not pre-installed in Mac OS X, it needs to be installed manually, and I chose MYSQL-5.5.10-OSX10.5-X86.DMG (http://dev.mysql.com/downloads/mysql/).
Download MySQL and choose the right version.
Run downloaded DMG file: First run mysql-5.5.10-osx10.6-x86.pkg, this is the main MySQL installation package, all the way by default installation can be completed.
Click to install the 2nd file mysqlstartupitem.pkg, so that MySQL will automatically start automatically when the boot.
Click the install 3rd file Mysql.prefpane to see the MySQL settings option in System settings preferences.
Using phpMyAdmin
phpMyAdmin (http://www.phpmyadmin.net/home_page/index.php) is a PHP development of the management of MySQL program, very popular and practical.
Download phpMyAdmin and select the appropriate version.
Unzip the downloaded phpMyAdmin copy to the Web directory.
Name the phpMyAdmin and the config.sample.inc.php of the directory config.inc.php
Open the config.inc.php and make the following modifications:
$cfg [' blowfish_secret '] = ';//for Cookie encryption, random long string
$cfg [' Servers '] [$i] [' host '] = ' 127.0.0.1 '; the//mysql daemon made IP bindings
$cfg [' Servers '] [$i] [' allownopassword '] = false;//access to MySQL without password
Accessing phpMyAdmin from the web and modifying the MySQL password is not null.
If you see an "Unable to load MCrypt (external chain, English) extensions, check your PHP configuration
A powerful encryption algorithm extension library, which includes 22 algorithms, phpMyAdmin relies on this PHP extension, as follows:
Download and extract libmcrypt-2.5.8.tar.gz (http://sourceforge.net/projects/mcrypt/files/Libmcrypt/).
Execute the following command at the terminal:
Tar zxvf libmcrypt-2.5.8.tar.gz
CD libmcrypt-2.5.8/
./configure--disable-posix-threads--enable-static
Make
sudo make install
Download and extract the PHP source file php-5.3.4.tar.gz (http://cn.php.net/get/php-5.3.4.tar.gz/from/a/mirror). The PHP version preinstalled in Mac OS X 10.6.3 is 5.3.4, so you need to download this version.
Execute the following command at the terminal:
Tar zxvf php-5.3.4.tar.gz
CD Php-5.3.4/ext/mcrypt
Phpize
./configure
Make
sudo cp modules/mcrypt.so/usr/lib/php/extensions/no-debug-non-zts-20090626/
Open php.ini
sudo vi/etc/php.ini
Add the following code to the php.ini, save and exit, and then restart Apache
Extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so