centos_mysql5.6.35_rpm安装
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软件包的目录。
[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://cdn.mysql.com//Downloads/MySQL-5.6/MySQL-devel-5.6.35-1.linux_glibc2.5.i386.rpm
[root@linuxidc tools]# wget http://cdn.mysql.com//Downloads/MySQL-5.6/MySQL-client-5.6.35-1.linux_glibc2.5.i386.rpm
[root@linuxidc tools]# wget http://cdn.mysql.com//Downloads/MySQL-5.6/MySQL-server-5.6.35-1.linux_glibc2.5.i386.rpm
5.下载完之后,安装三个rpm软件包。
[root@linuxidc tools]# rpm -ivh MySQL-server-5.6.35-1.linux_glibc2.5.i386.rpm
warning: MySQL-server-5.6.35-1.linux_glibc2.5.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
libaio.so.1 is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386
libaio.so.1(LIBAIO_0.1) is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386
libaio.so.1(LIBAIO_0.4) is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386
libgcc_s.so.1 is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386
libgcc_s.so.1(GCC_3.0) is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386
libgcc_s.so.1(GLIBC_2.0) is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386
libstdc++.so.6 is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386
libstdc++.so.6(CXXABI_1.3) is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386
libstdc++.so.6(GLIBCXX_3.4) is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386
安装MySQL-server报错,原因是没有安装libaio.so.1,libgcc_s.so.1,libstdc++.so.6,yum安装一下
[root@linuxidc tools]# yum -y install perl
[root@linuxidc tools]# yum install -y libaio.so.1
[root@linuxidc tools]# yum install -y libgcc_s.so.1
[root@linuxidc tools]# yum install -y libstdc++.so.6
[root@linuxidc tools]# rpm -ivh MySQL-server-5.6.35-1.linux_glibc2.5.i386.rpm
[root@linuxidc tools]# rpm -ivh MySQL-client-5.6.35-1.linux_glibc2.5.i386.rpm
warning: MySQL-client-5.6.35-1.linux_glibc2.5.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
libncurses.so.5 is needed by MySQL-client-5.6.35-1.linux_glibc2.5.i386
[root@linuxidc tools]# yum install -y libncurses.so.5
[root@linuxidc tools]# rpm -ivh MySQL-client-5.6.35-1.linux_glibc2.5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
[root@linuxidc tools]# rpm -ivh MySQL-devel-5.6.35-1.linux_glibc2.5.i386.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]# service mysql start
[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('password');
mysql> GRANT all privileges on *.* TO 'root'@'%' identified by 'password' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> SET PASSWORD FOR 'root'@'%' = PASSWORD('password');
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
centos_mysql5.6.35_rpm安装的更多相关文章
- centos_mysql5.6.21_rpm安装
1.查看操作系统相关信息.[root@linuxidc ~]# cat /etc/issue CentOS release 6.5 (Final) Kernel \r on an \m [root@l ...
- docker——容器安装tomcat
写在前面: 继续docker的学习,学习了docker的基本常用命令之后,我在docker上安装jdk,tomcat两个基本的java web工具,这里对操作流程记录一下. 软件准备: 1.jdk-7 ...
- 网络原因导致 npm 软件包 node-sass / gulp-sass 安装失败的处理办法
如果你正在构建一个基于 gulp 的前端自动化开发环境,那么极有可能会用到 gulp-sass ,由于网络原因你可能会安装失败,因为安装过程中部分细节会到亚马逊云服务器上获取文件.本文主要讨论在不变更 ...
- Sublime Text3安装JsHint
介绍 Sublime Text3使用jshint依赖Nodejs,SublimeLinter和Sublimelinter-jshint. NodeJs的安装省略. 安装SublimeLinter Su ...
- Fabio 安装和简单使用
Fabio(Go 语言):https://github.com/eBay/fabio Fabio 是一个快速.现代.zero-conf 负载均衡 HTTP(S) 路由器,用于部署 Consul 管理的 ...
- gentoo 安装
加载完光驱后 1进行ping命令查看网络是否通畅 2设置硬盘的标识为GPT(主要用于64位且启动模式为UEFI,还有一个是MBR,主要用于32位且启动模式为bois) parted -a optima ...
- Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级
Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 5.安装Database软件 5. ...
- Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作
Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 1.实施前准备工作 1.1 服务器安装操 ...
- 【原】nodejs全局安装和本地安装的区别
来微信支付有2年多了,从2年前的互联网模式转变为O2O模式,主要的场景是跟线下的商户去打交道,不像以往的互联网模式,有产品经理提需求,我们帮忙去解决问题. 转型后是这样的,团队成员更多需要去寻找业务的 ...
随机推荐
- sqlserver tips
方括号内的表示一个对象名(视图,存储过程,表 等).列名:正常使用时,加不加一样,但是如果对象名是保留字的话,比如cascade,就必须加:不过建议不用保留字作为对象名 if object_id('[ ...
- MM/PP/SD/FICO 模块常用事物码(T-code)、SAP快捷键
MM/PP/SD/FICO MM常用T-CODE MM01 创建一般物料 Create Material – GeneralMM02 修改一般物料 Change MaterialMM03 显示一般物料 ...
- zoj2770 Burn the Linked Camp --- 差分约束
有n个营地,每一个营地至多容纳Ci人.给出m个条件:第i到第j个营地之间至少有k人. 问n个营地总共至少有多少人. 此题显然差分约束.要求最小值.则建立x-y>=z方程组,建图求最长路. 用d[ ...
- HTML5的兴起与4G网络的出现,能否够终止移动端的持续下滑走向
HTML5的兴起与4G网络的出现,能否够终止移动端的持续下滑走向. 每当大家谈起互联网的未来的时候,多半谈及的是云.大数据.SAAS.仿佛要将一切摒弃.而当谈起移动互联网的时候.却坚持觉得NATIVE ...
- 谈抽象1——无脑copy等于自杀
近期被外派帮助国内某公司做政府某部门OA系统.听说他们那有个成熟的java框架,使用了非常长时间,抱着学习的态度,我进入这个公司.当我熟悉了一周后,留下了非常多疑问,而这些疑问,也诱发了这次关于&qu ...
- python cPickle和pickle 序列化
在Python中提供了两个模块:cPickle和pickle来实现序列化,前者是由C语言编写的,效率比后者高很多,一般编写程序的时候,采取的方案是先导入cPickle模块,如果此模块不存在,再导入pi ...
- 【BZOJ4821】[Sdoi2017]相关分析 线段树
[BZOJ4821][Sdoi2017]相关分析 Description Frank对天文学非常感兴趣,他经常用望远镜看星星,同时记录下它们的信息,比如亮度.颜色等等,进而估算出星星的距离,半径等等. ...
- 《从零开始学Swift》学习笔记(Day 24)——枚举
原创文章,欢迎转载.转载请注明:关东升的博客 Swift中的枚举可以定义一组常量.提高程序的可读性:还具有面向对象特性. 使用enum关键词声明枚举类型,具体定义放在一对大括号内,枚举的语法格式如下 ...
- getFullYear 方法
返回 Date 对象中用本地时间表示的年份值. dateObj.getFullYear() 必选项 dateObj 参数为 Date 对象. 说明要获取用全球标准时间 (UTC)表示的年份值,请使用 ...
- Cookies with curl the command line tool
w https://curl.haxx.se/docs/http-cookies.html curl has a full cookie "engine" built in. If ...