CentOS6.5系统下RPM包安装MySQL5.6(转)
1.查看操作系统相关信息。
[root@linuxidc ~]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m
[root@linuxidc ~]# uname -a
Linux linuxidc 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
2.创建需要下载rpm软件包的目录。
1 [root@linuxidc ~]# mkdir -p /taokey/tools
3.查看下是否有系统自带mysql的rpm包,如果有,需要删除自带的旧rpm包。
[root@linuxidc ~]# rpm -qa | grep mysql
mysql-libs-5.1.71-1.el6.x86_64
[root@linuxidc ~]# yum -y remove mysql-libs-5.1*
[root@linuxidc ~]# rpm -qa | grep mysql
[root@linuxidc ~]#
4.在MySQL官网下载安装MySQL-5.6.21所需的rpm软件包。
需要下载三个rpm软件包:
MySQL-client-5.6.21-1.rhel5.x86_64.rpm
MySQL-devel-5.6.21-1.rhel5.x86_64.rpm
MySQL-server-5.6.21-1.rhel5.x86_64.rpm
[root@linuxidc ~]# cd /taokey/tools/
[root@linuxidc tools]# wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.21-1.rhel5.x86_64.rpm
[root@linuxidc tools]# wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-devel-5.6.21-1.rhel5.x86_64.rpm
[root@linuxidc tools]# wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.21-1.rhel5.x86_64.rpm
5.下载完之后,安装三个rpm软件包。
[root@linuxidc tools]# rpm -ivh MySQL-server-5.6.21-1.rhel5.x86_64.rpm
error: Failed dependencies:
libaio.so.1()(64bit) is needed by MySQL-server-5.6.21-1.rhel5.x86_64
libaio.so.1(LIBAIO_0.1)(64bit) is needed by MySQL-server-5.6.21-1.rhel5.x86_64
libaio.so.1(LIBAIO_0.4)(64bit) is needed by MySQL-server-5.6.21-1.rhel5.x86_64
安装MySQL-server报错,原因是没有安装libaio,系统缺少libaio.so此软件包,下边yum安装一下libaio.so软件包。
[root@linuxidc tools]# yum install -y libaio
[root@linuxidc tools]# rpm -ivh MySQL-server-5.6.21-1.rhel5.x86_64.rpm
[root@linuxidc tools]# rpm -ivh MySQL-client-5.6.21-1.rhel5.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
[root@linuxidc tools]# rpm -ivh MySQL-devel-5.6.21-1.rhel5.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-devel ########################################### [100%]
6.修改配置文件位置。
[root@linuxidc tools]# cp /usr/share/mysql/my-default.cnf /etc/my.cnf
7.初始化MySQL及修改MySQL默认的root密码。
[root@linuxidc tools]# /usr/bin/mysql_install_db
[root@linuxidc tools]# ps -ef | grep mysql
root 2188 1 0 14:48 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/linuxidc.pid
mysql 2303 2188 30 14:48 pts/1 00:00:02 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/linuxidc.err --pid-file=/var/lib/mysql/linuxidc.pid
root 2331 1853 0 14:49 pts/1 00:00:00 grep mysql
[root@linuxidc tools]# netstat -anpt | grep 3306
tcp 0 0 :::3306 :::* LISTEN 2303/mysqld
[root@linuxidc tools]# more /root/.mysql_secret
# The random password set for the root user at Thu Apr 9 14:43:59 2015 (local time): F6K3v_xggFoLQeiN
[root@linuxidc tools]# mysql -uroot -pF6K3v_xggFoLQeiN
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.21
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SET PASSWORD = PASSWORD('123.com');
mysql> exit
Bye
[root@linuxidc tools]# mysql -uroot -p123.com
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.6.21 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
8.设置MySQL服务开机自启动。
[root@linuxidc tools]# chkconfig mysql on
[root@linuxidc tools]# chkconfig mysql --list
mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
到此为止,使用RPM安装MySQL5.6版本数据库安装完毕,谢谢大家。
CentOS 6.5下安装MySQL 5.6.21 http://www.linuxidc.com/Linux/2015-01/111413.htm
本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-04/116003.htm
CentOS6.5系统下RPM包安装MySQL5.6(转)的更多相关文章
- 在工作有时候centos6.5系统使用rpm包安装mysql5.7出现的问题
首先说明一下,我用的CentOS版本是6.6,64位.打印机驱动程序是两个rpm安装包:cndrvcups-common-2.60-1.x86_64.rpm和cndrvcups-capt-2.60-1 ...
- centos6.5环境通过rpm包安装mysql5.5.51数据库
centos6.5环境通过rpm包安装mysql5.5.51数据库 注意:此方法适用于单独安装数据库的需求,如果在该机器上还需要安装php环境,建议mysql通过编译或yum方式安装 1.查找已经安装 ...
- CentOS6.5下RPM包安装MySQL5.6.35
基本环境:VMware10.0+CentOS6.5+MySQL5.6.35 .查看操作系统相关 shell> cat /etc/issue shell> uname -a .创建需要下载r ...
- CentOS 6 下RPM方式安装MySQL5.6
CentOS 6 下RPM方式安装MySQL5.6 1. 下载Linux对应的RPM包,如:CentOS6.7_64对应的RPM包,如下:[root@mysql ~]# ll总用量 113808-rw ...
- Salt之CentOS7.5使用RPM包安装MySQL5.7.22
手动安装参考CentOS7.5使用RPM包安装MySQL5.7.22 目录结构为 install.sls文件 #按顺序分别安装commin libs client server #避免冲突安装comm ...
- linux下rpm包安装、配置和卸载mysql
WIN10下虚拟机:VMware workstation 12 PRO 安装 # 1.查看系统版本 [root@vm-xiluhua][/home/xiluhua]$ cat /etc/redhat- ...
- linux下rpm包安装、配置和卸载mysq
l WIN10下虚拟机:VMware workstation 12 PRO 安装 # 1.查看系统版本 [root@vm-xiluhua][/home/xiluhua]$ cat /etc/red ...
- ECS centos6.8系统下从nginx安装到简单网站上线配置操作的完整记录
1.准备工作 1.1已购买阿里云云服务器ECS 1.2域名已购买并解析成功 1.3安装有远程链接工具Xshell和文件传输工具Xftf,并链接上ECS实例 2.安装nginx(在Xshell操作) 2 ...
- centos6.5中rpm包安装mysql5.7(初始化出错如何解决)
下载rpm包见:http://www.cnblogs.com/grey-wolf/p/7472680.html 1.rz上传到服务器,解压缩 rz [root@mini2 upload]# -.el6 ...
随机推荐
- pytest的执行规则和顺序
用例运行级别 模块级(setup_module/teardown_module)开始于模块始末,全局的 函数级(setup_function/teardown_function)只对函数用例生效(不在 ...
- winform dataGridView中的button点击判断
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowI ...
- express框架以及配置项
以上命令会将 Express 框架安装在当前目录的 node_modules 目录中, node_modules 目录下会自动创建 express 目录.以下几个重要的模块是需要与 express 框 ...
- JS执行机制--事件循环--笔记
JS的解析是由浏览器中的JS解析引擎完成的.JS是单线程运行,也就是说,在同一个时间内只能做一件事,所有的任务都需要排队,前一个任务结束,后一个任务才能开始.但是又存在某些任务比较耗时,如IO读写等, ...
- 微软Power BI 每月功能更新系列——6月Power BI 新功能学习
Power BI Desktop 6月产品功能摘要 本月Power BI Desktop的更新,专注于图表格式化的灵活性调整,通过过滤和排序选项,数据视图现在更加强大.多个连接器也获得重大更新,其中包 ...
- React-Native 上拉加载下拉刷新
react-native 上下拉加载的控件效果都不好,找了半天没找到,正打算自已封装的时候,无意中找到了一个比较好的控件,大家看一下: react-native-refresh-list-view 这 ...
- Python学习笔记第十六周
目录: 一.CSS补充 1.页面布局 二.JavaScript补充 1.条件判断 2.函数分类 3.序列化 4.转义 5.eval 6.时间 7.作用域 三.DOM 1.间接查找 文本操作 样式操作 ...
- 创建一个版本库,把文件夹用Git管理起来
创建一个文件夹,把这个文件夹用Git管理起来,那么这个文件夹的改变都可以被Git跟踪到,当然也可以将Git中的文件还原到某一个时刻. 首先创建一个空的目录,然后将空的目录由Git来管理 1.建立一个文 ...
- 【转】visualSFM生成的bundle.rd.out文件的格式
1.bundle.out 文件包含了一些经过估算得到的场景和相机几何信息.文件的格式如下: //---------------------------------------------------- ...
- Linux交叉工具链安装
这篇博文http://blog.csdn.net/u010957054/article/details/58056863 提到了一个好的百度网盘,里面有各个版本的交叉工具链. http://www.3 ...