在FreeBSD下安裝mysql支持GBK字符集:
#cd/usr/ports/databases/mysql51-server
# make WITH_CHARSET=gbk WITH_XCHARSET=all WITH_PROC_SCOPE_PTH=yes BUILD_OPTIMIZED=yes BUILD_STATIC=yes SKIP_DNS_CHECK=yes WITHOUT_INNODB=yes install clean
mysqld中加入bind_address=127.0.0.1
#rehash
#mysql_install_db
#chown –R mysql:mysql /var/db/mysql
#/usr/local/etc/rc.d/mysql-server forcestart
#/usr/local/bin/mysqladmin -u root password 'new-password'