Installing mysql on FreeBSD from ports is one of the oddest installations I've ever completed. Here's the step by step:
Get it compiled:
# portinstall mysql50-server
-- OR --
# make -C /usr/ports/databases/mysql50-server install clean
Once it's installed, copy my-small.cnf, my-medium.cnf or my-huge.cnf to /usr/local/etc/my.cnf:
# cp /usr/local/share/mysql/my-small.cnf /usr/local/etc/my.cnf
Enable mysql in the rc.conf:
# echo "mysql_enable=\"YES\"" >> /etc/rc.conf
Install the authentication tables:
# mysql_install_db
Last, change the ownership on MySQL's data directory:
# chown -R mysql:mysql /var/db/mysql
If you miss the last step, you'll get something ugly like this:
mysqld started
[ERROR] /usr/local/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
[ERROR] /usr/local/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
[ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
mysqld ended

Thanks for this post! I couldn't remember the mysql_install_db bit. However, I think that if you add "--user=mysql" to the mysql_install_db command, it will set ownership correctly so you wouldn't need the chown command. (Also need "--datadir=/path/to/mysql/database_directory" if you want the database somewhere other than /var/db/mysql.) For example:
# mysql_install_db --user=mysql --datadir=/usr/local/var/db/mysql
But then you'd also need to add a matching mysql_dbdir line in your rc.conf:
# echo "mysql_dbdir=\"/usr/local/var/db/mysql\"" >> /etc/rc.conf
Hmm, some kind of formatting goodies here. The long options on the mysql_install_db command have double hyphens preceding them, but they look like em dashes in the post above.