Install MySQL Server on FreeBSD
สวัสดีครับตอนนี้ว่างเพราะรอ Restore Databse เข้า MySQL Cluster เลยพอมีเวลามาเขียนวิธีติดตั้ง MySQL บน FreeBSD เ้อาง่ายๆละกันนะครับ
1. ทำการ Update ports ของ FreeBSD
cvsup -g -L 2 /usr/share/examples/cvsup/ports-supfile -h cvsup.th.freebsd.org
2. ทำการติดตั้ง MySQL Server ผมเลือก Version 5.0 นะครับ
cd /usr/ports/databases/mysql50-server make all install clean WITH_CHARSET=tis620 WITH_XCHARSET=all WITH_COLLATION=tis620_thai_ci
3. ทำการแก้ไขไฟล์ rc.conf เพื่อให้ MySQL Start ทุกๆครั้งที่ boot
echo 'mysql_enable="YES"' >> /etc/rc.local
4. ทำการ start mysql
/usr/local/etc/rc.d/mysql-server start
5. ทำการทดสอบ ใช้งาน mysql
mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1212502 to server version: 4.1.21 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
เป็นอันจบพิธีครับ ![]()