Eric D. Schabell: MacPorts MySql server install howto

Wednesday, February 21, 2007

MacPorts MySql server install howto

I have a nice new macbook and wanted to setup my development tools; eclipse, php, macports, and mysql. Here is the steps to get mysql server working (mysql5 in my case):


# install server and the launch script
# needed to start it. (I like the -v option
# to see what is happening.)
#
$ sudo port -v install mysql5 +server

# initialize the setup as mysql user.
#
$ sudo -u mysql mysql_install_db5

# start mysql and set your root password.
#
$ sudo -u mysql /opt/local/lib/mysql5/bin/mysqld_safe &
$ sudo /opt/local/lib/mysql5/bin/mysqladmin -u root password '[new_passwd]'