1.从 http://www.mysql.com 下载最新稳定版本的open source v, mysql-5.0.18.tar.gz
2. 解压 tar zxvf myql-5.0.18.tar.gz
3.
## 添加用户组
shell$ groupadd mysql
shell$ useradd -g mysql mysql
shell$ cd mysql-VERSION
## 配置Mysql安装路径并且支持中文
shell$ ./configure –prefix=/usr/local/mysql –with-charset=gb3212
shell$ make
shell$ make install
## 替换/etc/my.cnf文件
shell$ cp support-files/my-medium.cnf /etc/my.cnf
## 初始化数据库,进入已经安装好的mysql目录
shell$ cd /usr/local/mysql
shell$ bin/mysql_install_db –user=mysql
## 设置给mysql和root用户设定访问权限
shell$ chown -R root /usr/local/mysql
shell$ chown -R mysql /usr/local/mysql/var
shell$ chgrp -R mysql /usr/local/mysql
## 启动mysql
shell$ bin/mysqld_safe –user=mysql &
## 用ntsysv设置使mysql每次启动都能自动运行
shell$ chkconfig –add mysqld
## 下面这步比较关键,这样在编译类似PHP,Vpopmail等软件时可以不用指定mysql的库文件地址
shell$ ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
shell$ ln -s /usr/local/mysql/include/mysql /usr/include/mysql
## 测试
shell> bin/mysql -uroot -p