1. 查看已安装的安装包
rpm -qa | grep -i mysql
MySQL-server-5.0.67-1.sles11
libqt4-sql-mysql-4.6.2-1.6.11
libmysqlclient15-5.0.67-13.20.1
php5-mysql-5.2.6-50.24.1
MySQL-client-5.0.67-1.sles11
libmysqlclient_r15-5.0.67-13.20.1
2. 删除已有的mysql
rpm -e MySQL-server-5.0.67-1.sles11
rpm -e MySQL-client-5.0.67-1.sles11
3. 移除mysql相关的目录及文件
find / -name mysql
/etc/apparmor.d/abstractions/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/lib64/mysql
/usr/local/quickfix_old/src/sql/mysql
rm -rf /etc/apparmor.d/abstractions/mysql
rm -rf /var/lib/mysql
rm -rf /var/lib/mysql/mysql
rm -rf /usr/lib64/mysql
rm -rf /usr/local/quickfix_old/src/sql/mysql
ls /etc/my*
/bin/ls: /etc/my*: No such file or directory
4. 安装
rpm -ivh MySQL-server-5.5.42-1.sles11.x86_64.rpm
rpm -ivh MySQL-client-5.5.42-1.sles11.x86_64.rpm
5. 如何下载mysql安装包
可以打开网址进行下载:http://mirrors.sohu.com/mysql/MySQL-5.5/