Admin Life Errors, Fixes, and Encounters

2Jan/102

Installing MySQL 5.1 on FreeBSD 7.x

Some quick reference for anyone on FreeBSD 7.x who needs(including myself) to install MySQL 5.1

================== installing mysql 5.1 ================
# cd /usr/ports/databases/mysql51-client
# make install clean

# cd /usr/ports/databases/mysql51-server
# make install clean

# cd /usr/ports/databases/mysql51-scripts
# make install clean

# cp /usr/local/share/mysql/my-small.cnf /usr/local/etc/my.cnf
# chown -R mysql:mysql /var/db/mysql

### This will auto start MySQL on startup, it'll also allow you to start mysql from /usr/local/etc/rc.d/
# echo "mysql_enable=\"YES\"" >> /etc/rc.conf

# cd /usr/local/bin/
# ./mysql_install_db

# /usr/local/bin/mysqld_safe &
# cd /usr/local/bin/

### setup default databases & tables
# ./mysql_secure_installation

Filed under: software-setup 2 Comments