This page explains how to install and start the MySQL server version 5.6 on the FreeBSD 10.0 operating system.
To install the software, log in as root and type
# pkg install mysql56-server mysql56-client
This installs the database server and the client. To allow the database server to run, edit the file /etc/rc.conf to add the following line:
mysql_enable="YES"
Now you can start the server with
# /usr/local/etc/rc.d/mysql-server start
You will see output similar to the following:
Starting mysql.
You can test that the database is running correctly using the command-line tool mysql. Type
mysql
The output looks like this:
You can leave the command line tool by typing "exit"
mysql> exit
The output looks like this:
To stop the server, use
# /usr/local/etc/rc.d/mysql-server stop
The output looks like this:
If the server is running, and you want to restart it, you can also do that as follows:
# /usr/local/etc/rc.d/mysql-server restart