下载所需RPM软件包
到http://dev.mysql.com/downloads/mysql/5.5.html#downloads找到所需的RPM包。
所需的RPM包如下
- Server
- Client
- Shared libraries
- Headers and libraries
以CentOS 5 32位为例,我们需要下载如下RPM包及依赖。
- wget http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-server-5.5.14-1.rhel5.i386.rpm/from/http://mysql.he.net/
- wget http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-client-5.5.14-1.rhel5.i386.rpm/from/http://mysql.he.net/
- wget http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-shared-5.5.14-1.rhel5.i386.rpm/from/http://mysql.he.net/
- wget http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-devel-5.5.14-1.rhel5.i386.rpm/from/http://mysql.he.net/
- wget ftp://ftp.sunet.se/pub/Linux/distributions/redhat/redhat-archive/redhat/linux/9/en/os/i386/RedHat/RPMS/libaio-0.3.93-4.i386.rpm
安装软件
- rpm -ivh libaio-0.3.93-4.i386.rpm
- rpm -ivh MySQL-server-5.5.14-1.rhel5.i386.rpm
- rpm -ivh MySQL-client-5.5.14-1.rhel5.i386.rpm
- rpm -ivh MySQL-shared-5.5.14-1.rhel5.i386.rpm
- rpm -ivh MySQL-devel-5.5.14-1.rhel5.i386.rpm
启动MySQL服务器并设置密码
- service mysql start
- mysql_secure_installation