The commands are given below. Though this was used to install mysql 5.5.4 , it is applicable to older versions also (and perhaps newer ones as well).
make install clean
chown -R mysql /var/db/mysql/
chgrp -R mysql /var/db/mysql/
/usr/local/bin/mysqld_safe –user=mysql &
/usr/local/bin/mysqladmin -u root password newpassword
Edit /etc/rc.conf to start mysql server at startup by putting the line
After this, restart FreeBSD.