#忽略大小写检查已安装的mysql
# rpm -qa|grep -i mysql
perl-DBD-MySQL-4.023-5.el7.x86_64
qt3-MySQL-3.3.8b-51.el7.x86_64
qt-mysql-4.8.5-8.el7.x86_64
akonadi-mysql-1.9.2-4.el7.x86_64
#卸载自带的MySQL
# rpm -e perl-DBD-MySQL-4.023-5.el7.x86_64 --nodeps
# rpm -e qt3-MySQL-3.3.8b-51.el7.x86_64 --nodeps
# rpm -e qt-mysql-4.8.5-8.el7.x86_64 --nodeps
# rpm -e akonadi-mysql-1.9.2-4.el7.x86_64 --nodeps
# rpm -qa|grep -i mariadb
mariadb-5.5.41-2.el7_0.x86_64
mariadb-devel-5.5.41-2.el7_0.x86_64
mariadb-server-5.5.41-2.el7_0.x86_64
mariadb-libs-5.5.41-2.el7_0.x86_64
#卸载mariadb
# rpm -e mariadb-5.5.41-2.el7_0.x86_64 --nodeps
# rpm -e mariadb-devel-5.5.41-2.el7_0.x86_64 --nodeps
# rpm -e mariadb-server-5.5.41-2.el7_0.x86_64 --nodeps
# rpm -e mariadb-libs-5.5.41-2.el7_0.x86_64 --nodeps
#安装
# rpm -ivh MySQL-server-5.6.26-1.linux_glibc2.5.x86_64.rpm
警告:MySQL-server-5.6.26-1.linux_glibc2.5.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:MySQL-server-5.6.26-1.linux_glibc################################# [100%]
======================================================================
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.
You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag.
Also, the account for the anonymous user has been removed.
In addition, you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test database.
This is strongly recommended for production servers.
See the manual for more instructions.
Please report any problems at http://bugs.mysql.com/
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings
======================================================================
# vi /root/.mysql_secret
# id mysql
uid=27(mysql) gid=27(mysql) 组=27(mysql)
# whereis mysql
mysql: /usr/bin/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
# service mysql start
Starting MySQL. [ 确定 ]
# netstat -anp|grep 3306
tcp6 0 0 :::3306 :::* LISTEN 10202/mysqld
# rpm -ivh MySQL-client-5.6.26-1.linux_glibc2.5.x86_64.rpm
警告:MySQL-client-5.6.26-1.linux_glibc2.5.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:MySQL-client-5.6.26-1.linux_glibc################################# [100%]