Tuesday, January 20, 2009

MAMP on Leopard part II

MySQL is the hugely popular SQL database server. It is the only part of MAMP that isn't installed by default with Leopard. No problem, a quick visit to mysql.com will let you download it, select Mac OS X package format. (N.B. Pick the 32-bit version, the 64-bit will cause a headache later if you plan to use Perl's MySQL DBI, see my previous post).

Run all 3 applications within the download: mysql-5.1.X-osx10.5-x86.pkg, MySQLStartupItem.pkg and MySQL.prefPane.

MySQL can be started/stopped via the the MySQL panel in System preferences, or via the command-line:

sudo /Library/StartupItems/MySQLCOM/MySQLCOM {start|stop|restart}

Now it is installed you should remove the anonymous login accounts and add a password to the root account. There is plenty of information on securing MySQL available here.

Configure PHP in part III.