Home > Database > Mysql Tutorial > centOS6.6系统中rpm安装 MySQL-5.6.30

centOS6.6系统中rpm安装 MySQL-5.6.30

WBOY
Release: 2016-06-07 14:50:51
Original
1107 people have browsed it

RPM方式安装MySQL5.6.30 a. 检查 MySQL 及相关 RPM 包,是否安装,如果有安装,则移除( rpm–e名称) 1 [root@localhost ~] # rpm -qa | grep -i mysql 2 mysql-libs-5.1.66-2.el6_3.x86_64 3 [root@localhost ~] # yum -y remove mysql-libs* b. 下载Linux

RPM方式安装MySQL5.6.30

a. 检查MySQL及相关RPM包,是否安装,如果有安装,则移除(rpm –e 名称)

1 [root@localhost ~]# rpm -qa | grep -i mysql
2 mysql-libs-5.1.66-2.el6_3.x86_64
3 [root@localhost ~]# yum -y remove mysql-libs*

b. 下载Linux对应的RPM包,如:CentOS6.6_64对应的RPM包,如下:

1 [root@localhost rpm]# ll
2 total 74364
3 -rw-r--r--. 1 root root 18442536 Dec 11 16:43 MySQL-client-5.6.30-1.linux_glibc2.5.x86_64.rpm
4 -rw-r--r--. 1 root root  3340660 Dec 11 <span style="font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace; font-size:14px; line-height:15.4px"> 16:43</span> MySQL-devel-<span style="font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace; font-size:14px; line-height:15.4px">5.6.30-1.linux_glibc2.5.x86<span style="font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace; font-size:14px; line-height:15.4px">_64</span></span>.rpm
5 -rw-r--r--. 1 root root 54360600 Dec 11 <span style="font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace; font-size:14px; line-height:15.4px"> 16:43</span> MySQL-server-<span style="font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace; font-size:14px; line-height:15.4px">5.6.30-1.linux_glibc2.5.x86<span style="font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace; font-size:14px; line-height:15.4px">_64</span></span>.rpm

c. 安装MySQL

1 [root@localhost rpm]# rpm -ivh MySQL-server-5.6.30-1.linux_glibc2.5.x86_64.rpm
2 [root@localhost rpm]# rpm -ivh <span style="font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace; font-size:14px; line-height:15.4px; background-color:rgb(248,248,248)"> MySQL-devel-</span><span style="font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace; font-size:14px; line-height:15.4px; background-color:rgb(248,248,248)">5.6.30-1.linux_glibc2.5.x86<span style="line-height:15.4px">_64</span></span><span style="font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace; font-size:14px; line-height:15.4px; background-color:rgb(248,248,248)">.rpm</span>
3 [root@localhost rpm]# rpm -ivh <span style="color:rgb(51,51,51); font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace; font-size:14px; line-height:15.4px"> MySQL-client-5.6.30-1.linux_glibc2.5.x86_64.rpm</span>
4 #修改配置文件位置
5 [root@localhost rpm]# cp /usr/share/mysql/my-default.cnf /etc/my.cnf

d. 初始化MySQL及设置密码

1 [root@localhost rpm]# /usr/bin/mysql_install_db
2 [root@localhost rpm]# service mysql start
3
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template