Building MySQL from source (การ build จาก source)
เครื่องมือที่ต้องมีเพื่อ build และ install MySQL จาก source:
GNU gunzip เพื่อ uncompress distribution และ tar เพื่อ unpack
ANSI C++ compiler
Make program ที่ดี (แนะนำ GNU make)
คำสั่งสำหรับติดตั้งจาก unpacked tar file:
shell> configure shell> make shell> make install shell> scripts/mysql_install_db shell> /usr/local/mysql/bin/safe_mysqld &
หากเริ่มจาก source RPM:
shell> rpm --rebuild MySQL-VERSION.src.rpm
จะสร้าง binary RPM ที่ติดตั้งได้
New users เพิ่มได้ด้วย bin/mysql_setpermission script หากติดตั้ง DBI และ Msql-Mysql-modules Perl modules
ขั้นตอนรายละเอียด
เลือก directory สำหรับ unpack distribution และ cd ไปที่นั่น
ดาวน์โหลด distribution file จากไซต์ใน 'Getting MySQL' (compressed tar archives)
Unpack distribution:
shell> gunzip < mysql-VERSION.tar.gz | tar xvf -
สร้าง directory ชื่อ `mysql-VERSION`
cd เข้า top-level directory:
shell> cd mysql-VERSION
Configure และ compile:
shell> ./configure --prefix=/usr/local/mysql shell> make
ติดตั้ง (รัน as root):
shell> make install
สร้าง MySQL grant tables (ครั้งแรก):
shell> scripts/mysql_install_db
Initialize และ test distribution