1、MySQL 5.6.32 64位安装包下载
在官网http://dev.mysql.com/downloads/mysql/5.6.html#中使用迅雷下载MySQL 5.6.32 64位安装包下载:
(http://cdn.mysql.com//Downloads/MySQL-5.6/MySQL-5.6.32-1.linux_glibc2.5.x86_64.rpm-bundle.tar)
2、把下载文件通过SecureFX传递到/usr/local/src/目录中(虚拟主机CentOS7.2的IP为:192.168.1.11)
3、解压文件.
cd /usr/local/src/
[[email protected] src]# tar xvf MySQL-5.6.32-1.linux_glibc2.5.x86_64.rpm-bundle.tar
MySQL-shared-compat-5.6.32-1.linux_glibc2.5.x86_64.rpm
MySQL-client-5.6.32-1.linux_glibc2.5.x86_64.rpm
MySQL-shared-5.6.32-1.linux_glibc2.5.x86_64.rpm
MySQL-server-5.6.32-1.linux_glibc2.5.x86_64.rpm
MySQL-devel-5.6.32-1.linux_glibc2.5.x86_64.rpm
MySQL-test-5.6.32-1.linux_glibc2.5.x86_64.rpm
MySQL-embedded-5.6.32-1.linux_glibc2.5.x86_64.rpm
4、查看系统是否安装了MySQL,使用命令:
[[email protected] src]# rpm -qa | grep mysql
mysql-connector-odbc-5.2.5-6.el7.x86_64
卸载已安装的MySQL,卸载mysql命令如下:
[[email protected] src]# rpm -e --nodeps mysql-connector-odbc-5.2.5-6.el7.x86_64
将/var/lib/mysql文件夹下的所有文件都删除干净。
5、使用如下命令安装Server和Client:
[[email protected] src]# rpm -ivh MySQL-server-5.6.32-1.linux_glibc2.5.x86_64.rpm
[[email protected] src]# rpm -ivh MySQL-client-5.6.32-1.linux_glibc2.5.x86_64.rpm
6、使用如下命令查看当前mysql的状态: