How to install MySQL on FreeBSD 7.2 or on Red Hat 5.4?

There are two easy ways on FreeBSD:

From Ports

You can install easily from Ports. Make sure your ports tree is up to date:






portsnap fetch

portsnap extract

portsnap udpate

Then just do this to install MySQL on FreeBSD.



cd /usr/ports/databases/mysql51-server

make install

Or if you want to use utf8 by default, run this command:

ServerName#make WITH_CHARSET=utf8 install

MySQL 5.1 Server (and MySQL 5.1 client) will download, compile, and install automagically for you.

From Packages

You can also install easily as a binary package with this simple command.

ServerName#pkg_add -r mysql51-server

Make sure to secure you MySQL installation.

Red Hat
Using RPM

You have to go to the MySQL site and download the MySQL 5.1 server RPM and install it.

It does not automatically install the MySQL client, you have to download that as a separate RPM and install it.

Using yum

Since I didn’t have a MySQL license, yum didn’t work, so I don’t know if it can be installed using yum.

Make sure to secure you MySQL installation.

Copyright ® – Linking to this article is allowed without permission and as many as ten lines of this article can be used along with this link. Any other use of this article is allowed only by permission of

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Pingback: Installing an Apache + SSL on FreeBSD using the ports tree | Rhyous

  2. Pingback: How to create a UTF-8 Unicode Database on MySQL and make UTF-8 Unicode the default? | Rhyous

  3. You can also install MySQL using the WITH_CHARSET=utf8 option to have it set utf8 as the default during the installation. a bit less work than adding the lines to the config manually =)