MySQL Quick Installation on FreeBSD

Quick installation of MySQL Database on FreeBSD Server. Make sure you are on the latest FreeBSD Port Tree with portsnap, refer to keeping update ports. If you want to browse through what version of MySQL is available in FreeBSD;

MySQL Installation with FreeBSD Port

We will take MySQL5.0 as example, to install

It will take 5-15 minutes for installation and compile time. If you have any error during compiling MySQL, please do not hesitate to post in the comment box here.

You don’t have to run mysql_install_db, to before starting MySQL, put this lines in /etc/rc.conf file;

To start MySQL

You will see the warning messages for the first time of launching MySQL Server, just another warning message.

Customize MySQL’s my.cnf File and Post Install

MySQL’s default my.cnf file is available at /usr/local/share/mysql, copy the cnf file which suit your usage to the database data directory you have defined earlier on /etc/rc.conf. Stop and start MySQL if you make any changes on my.cnf file.

By default, MySQL doesn’t set password for system root account, it’s advice to set a password for your MySQL’s root account;

Now, you can access to your MySQL database

If you do not want to use root, you can create an account by your own username;

That’s the quick install of MySQL5 on FreeBSD Server, it’s quick isn’t it?