Install ports with FreeBSD
Step 2
# Cd/usr/ports/databases/mysql40-server/
Step 2
# Make install
Depending on your network speed, it may take more than 10 minutes
...
Step 2: Install the database
#/Usr/local/bin/mysql_install_db
Step 2:
# Chown-R mysql/var/db/mysql
Step 2: Start mysql
#/Usr/local/bin/mysqld_safe &
Step 2: Set the root user password
#/Usr/local/bin/mysqladmin-u root password '000000'
Step 2: log on and test the root user
# Mysql-u root-p
Step 2: Set mysql to automatically start when the system starts
# Vi/etc/rc. conf
Press the key and add the following at the end:
Mysql_enable = "YES"
For example, my configuration file:
# Created: Mon Apr 19 19:36:56 2010
# Enable network daemons for user convenience.
# Please make all changes to this file, not to/etc/defaults/rc. conf.
# This file now contains just the overrides from/etc/defaults/rc. conf.
Defaultrouter = "192.168.192.1"
Hostname = "Squid_CA.NIC"
Ifconfig_le0 = "inet 192.168.192.33 netmask 255.255.255.0"
Keymap = "us. iso"
Linux_enable = "YES"
Sshd_enable = "YES"
Mysql_enable = "YES"