************************************************************************
Remember to run mysql_upgrade (with the optional --datadir=<dbdir> flag)
the first time you start the MySQL server after an upgrade from an
earlier version.
************************************************************************
install-info --quiet /usr/local/info/mysql.info /usr/local/info/dir
===> Installing rc.d startup script(s)
===> Compressing manual pages for mysql-server-5.0.90
===> Registering installation for mysql-server-5.0.90
===> SECURITY REPORT:
This port has installed the following files which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/libexec/mysqld
This port has installed the following startup scripts which may cause
these network services to be started at boot time.
/usr/local/etc/rc.d/mysql-server
If there are vulnerabilities in these programs there may be a security
risk to the system. FreeBSD makes no guarantee about the security of
ports included in the Ports Collection. Please type &#39;make deinstall&#39;
to deinstall the port if this is a concern.
For more information, and contact details about the security
status of this software, see the following webpage:
http://www.mysql.com/
===> Cleaning for mysql-client-5.0.90
===> Cleaning for mysql-server-5.0.90

Starting MySQL

Before starting the database daemon we need to initialize the
database directory, so execute the following commands to do so:

$ sudo mysql_install_db --user=mysql

Set proper permission of the MySQL directory:

$ sudo chown -R mysql:mysql /var/db/mysql

Copy the MySQL configuration file. According to the setup and
purpose you will be using the MySQL database copy
my-{huge, innodb-heavy-4G, large, medium, small}.cnf configuration
file from /usr/local/share/mysql directory.

So for example if your requirements are not that big and you plan to
use MySQL just to experiment with the database you may want to
copy the mysql-medium.cnf configuration file

$ sudo cp /usr/local/share/mysql/mysql-medium.cnf /etc/my.cnf

Now we can start the database:

$ sudo mysqld_safe --user=mysql &

Securing MySQL

The very first thing that we need to do is to define a password for the
MySQL root account:

$ sudo mysqladmin -u root password <new-password>

The next thing we need to do is to secure the MySQL user accounts.

When MySQL was first installed it created some anonymous
password-less accounts.

In the next step we are going to remove those accounts due to
security reasons.

So, login to the database and provide the password you set for the
root account in the previous step: