Home  >  Article  >  Database  >  RHEL 6.4(i386)安装MySQL 5.6的方法

RHEL 6.4(i386)安装MySQL 5.6的方法

WBOY
WBOYOriginal
2016-06-07 17:33:44867browse

Linux公社(www.linuxidc.com)是专业的Linux系统门户网站,实时发布最新Linux资讯,包括Linux、Ubuntu、Fedora、RedHat、红旗Linux、Linux教程、Linux认证、SUSE

1. 下载MySQL 5.6

下载页面:

此处选择“Red Hat Enterprise Linux 6 / Oracle Linux 6 (x86, 32-bit), RPM Bundle”下载,下载至/root/Downloads/目录下,下载文件名为“MySQL-5.6.15-1.el6.i686.rpm-bundle.tar”

 

2. 解压tar包

cd /root/Downloads/

tar -xvf MySQL-5.6.15-1.el6.i686.rpm-bundle.tar

 

3. 以RPM方式安装MySQL

在RHEL系统中,,必须先安装“MySQL-shared-compat-5.6.15-1.el6.i686.rpm”这个兼容包,然后才能安装server和client,否则安装时会出错。

yum install MySQL-shared-compat-5.6.15-1.el6.i686.rpm # RHEL兼容包

yum install MySQL-server-5.6.15-1.el6.i686.rpm # MySQL服务端程序

yum install MySQL-client-5.6.15-1.el6.i686.rpm # MySQL客户端程序

yum install MySQL-devel-5.6.15-1.el6.i686.rpm # MySQL的库和头文件

yum install MySQL-shared-5.6.15-1.el6.i686.rpm # MySQL的共享库

 

4. 配置MySQL登录密码

cat /root/.mysql_secret # 获取MySQL安装时生成的随机密码
service mysql start # 启动MySQL服务
mysql -uroot -p # 进入MySQL,使用之前获取的随机密码
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('password'); # 在MySQL命令行中设置root账户的密码为password
quit # 退出MySQL命令行
service mysql restart # 重新启动MySQL服务

推荐阅读:

Ubuntu下Nginx做负载实现高性能WEB服务器5---MySQL主主同步

生产环境MySQL主主同步主键冲突处理

MySQL主从失败 错误Got fatal error 1236

MySQL主从复制,单台服务器上实施

linux

Statement:
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