1.Add a login user and group for `MYSQLd' to run as:为‘mySQLd’增添一个登陆用户和组
shell> groupadd mySQL
2.解压
shell> gunzip < mySQL-5.0.15.tar.gz | tar -xvf -
shell> cd mySQL-5.0.15
3.Configure the release and compile everything:配置和编译给configure分配可执行文件
shell> chmod +x configure
改变字符集为 GBK [默认字符集为ISO-8859-1(Latin1)]
shell> ./configure --prefix=/usr/local/mySQL --with-charset=gbk
shell> make
(字符集还有big5、cp1251、cp1257、czech、danish、dec8、dos、euc_kr、gb2312 gbk、german1、hebrew、 hp8、hungarian、koi8_ru、koi8_ukr、latin1、latin2、sjis、swe7、tis620、ujis、usa7、win1251或win1251ukr)
4.安装所有东西
shell> make install
5.如果你想安装选项文件,使用当前存在的‘support-files’ 文件夹下的作为模板,例如:
shell> cp support-files/my-medium.cnf /etc/my.cnf
6.如果想MYSQLd每次开机自动启动的话。cp -r support-files/mySQL.server /etc/init.d/就行了
shell> cp -r support-files/MYSQL.server /etc/init.d/mySQL
shell> cd /etc/rc.d/init.d
shell> chmod +x mySQL
shell> /sbin/chkconfig --del mySQL
shell> /sbin/chkconfig --add mySQL
7.进入安装目录
shell> cd /usr/local/mySQL
8.如果你以前没有安装过MYSQL,你必须创建一个MySQL准许的表
Mysql linux安装日志