Install mysql and server with macports:

    port install mysql5 +server

Generate the default database and permissions tables.

This is a good command to know if you want to wipe all your settings and start from scratch.

    /opt/local/lib/mysql5/bin/mysql_install_db --user=mysql

Launch mysql daemon

    /opt/local/bin/mysqld_safe5

Security

Set your admin password for security</strong>

    mysqladmin5 -u root password (your password)
    ln -s /opt/local/lib/mysql5/bin/mysql /opt/local/bin/mysql
    ln -s /opt/local/lib/mysql5/bin/mysqladmin /opt/local/bin/mysqladmin
    ln -s /opt/local/lib/mysql5/bin/mysqldump /opt/local/bin/mysqldump
comments powered by Disqus