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]'


  1. This was helpful to me. Thanks for posting it.

  2. Thanks for this incantation. It worked like a charm.

  3. Thank you very much! I still have one question though, how can I set MySQL5 to run when I turn on my Mac?

  4. This comment has been removed by a blog administrator.

  5. Mijndert, there you go (see karwas posting)!

    Karwas, thanks for the tip!


Note: Only a member of this blog may post a comment.