Linux平台下安装MySQL
1.下载RPM包
http://dev.mysql.com/downloads/mysql/5.5.html#downloads
选择【Red Hat & Oracle Enterprise Linux】平台,下载客户端和服务器端的RPM包
2.解压
# tar -xvf MySQL-6.6.13-1.rhel5.i386.tar
3.切换root用户
# su -
4.安装server 5.5
# rpm -ivh MySQL-server-5.5.13-1.rhel5.i386.rpm
5.更改密码
# /usr/bin/mysqladmin -u root password '123456'
6.查看旧版本MySQL的命令
# rpm -qa | grep -i mysql
7.卸载旧版本
# rpm -ev mysql-5.0.77-4.el_4.2
8.启动服务
# service mysql restart
9.安装客户端
# rpm -ivh MySQL-client-5.5.13-1.rhel5.i386.rpm
10.安装成功后使用命令进行登录
# rpm -ivh MySQL-client-5.5.13-1.rhel5.i386.rpm
11.更改root密码
# /usr/bin/mysqladmin -u root.password '123456'