CentOS6.5上安装MySQL
1.查看操作系统的相关信息
2.查看系统上所有MySQL的rpm包并删除
[root@master ~]# rpm -qa | grep -i mysql
[root@masterc ~]# yum -y remove mysql-libs-5.1*
3.下载MySQL-5.6.21所需的rpm包
[root@master tools]# wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.21-1.rhel5.x86_64.rpm
[root@master tools]# wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-devel-5.6.21-1.rhel5.x86_64.rpm
[root@master tools]# wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.21-1.rhel5.x86_64.rpm
4.安装三个rpm包
[root@master tools]# rpm -ivh MySQL-server-5.6.21-1.rhel5.x86_64.rpm
如果运行的过程是这样,就恭喜你失败了,因为之前安装的MySQL没有删除干净,会导致后面出现各种乱七八糟的错。
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
解决方法:查看残留的目录并删除相关的文件
whereis mysql
rm –rf /usr/lib64/mysql
rm –rf /usr/my.cnf
rm -rf /root/.mysql_sercret
rm -rf /var/lib/mysql
正确的过程:
Preparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]
2017-09-25 13:46:09 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-09-25 13:46:09 2188 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-09-25 13:46:09 2188 [Note] InnoDB: The InnoDB memory heap is disabled
2017-09-25 13:46:09 2188 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-09-25 13:46:09 2188 [Note] InnoDB: Memory barrier is not used
2017-09-25 13:46:09 2188 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-09-25 13:46:09 2188 [Note] InnoDB: Using Linux native AIO
2017-09-25 13:46:09 2188 [Note] InnoDB: Using CPU crc32 instructions
2017-09-25 13:46:09 2188 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-09-25 13:46:09 2188 [Note] InnoDB: Completed initialization of buffer pool
2017-09-25 13:46:09 2188 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2017-09-25 13:46:09 2188 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2017-09-25 13:46:09 2188 [Note] InnoDB: Database physically writes the file full: wait...
2017-09-25 13:46:09 2188 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2017-09-25 13:46:09 2188 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2017-09-25 13:46:10 2188 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2017-09-25 13:46:10 2188 [Warning] InnoDB: New log files created, LSN=45781
2017-09-25 13:46:10 2188 [Note] InnoDB: Doublewrite buffer not found: creating new
2017-09-25 13:46:10 2188 [Note] InnoDB: Doublewrite buffer created
2017-09-25 13:46:10 2188 [Note] InnoDB: 128 rollback segment(s) are active.
2017-09-25 13:46:10 2188 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-09-25 13:46:10 2188 [Note] InnoDB: Foreign key constraint system tables created
2017-09-25 13:46:10 2188 [Note] InnoDB: Creating tablespace and datafile system tables.
2017-09-25 13:46:10 2188 [Note] InnoDB: Tablespace and datafile system tables created.
2017-09-25 13:46:10 2188 [Note] InnoDB: Waiting for purge to start
2017-09-25 13:46:10 2188 [Note] InnoDB: 5.6.21 started; log sequence number 0
A random root password has been set. You will find it in '/root/.mysql_secret'.
2017-09-25 13:46:14 2188 [Note] Binlog end
2017-09-25 13:46:14 2188 [Note] InnoDB: FTS optimize thread exiting.
2017-09-25 13:46:14 2188 [Note] InnoDB: Starting shutdown...
2017-09-25 13:46:15 2188 [Note] InnoDB: Shutdown completed; log sequence number 1625977
2017-09-25 13:46:15 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-09-25 13:46:15 2211 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-09-25 13:46:15 2211 [Note] InnoDB: The InnoDB memory heap is disabled
2017-09-25 13:46:15 2211 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-09-25 13:46:15 2211 [Note] InnoDB: Memory barrier is not used
2017-09-25 13:46:15 2211 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-09-25 13:46:15 2211 [Note] InnoDB: Using Linux native AIO
2017-09-25 13:46:15 2211 [Note] InnoDB: Using CPU crc32 instructions
2017-09-25 13:46:15 2211 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-09-25 13:46:15 2211 [Note] InnoDB: Completed initialization of buffer pool
2017-09-25 13:46:15 2211 [Note] InnoDB: Highest supported file format is Barracuda.
2017-09-25 13:46:15 2211 [Note] InnoDB: 128 rollback segment(s) are active.
2017-09-25 13:46:15 2211 [Note] InnoDB: Waiting for purge to start
2017-09-25 13:46:15 2211 [Note] InnoDB: 5.6.21 started; log sequence number 1625977
2017-09-25 13:46:15 2211 [Note] Binlog end
2017-09-25 13:46:15 2211 [Note] InnoDB: FTS optimize thread exiting.
2017-09-25 13:46:15 2211 [Note] InnoDB: Starting shutdown...
2017-09-25 13:46:17 2211 [Note] InnoDB: Shutdown completed; log sequence number 1625987
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.
You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag.
Also, the account for the anonymous user has been removed.
In addition, you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test database.
This is strongly recommended for production servers.
See the manual for more instructions.
Please report any problems at http://bugs.mysql.com/
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings
WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server
[root@master tools]# rpm -ivh MySQL-client-5.6.21-1.rhel5.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
[root@master tools]# rpm -ivh MySQL-devel-5.6.21-1.rhel5.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-devel ########################################### [100%]
5.修改配置文件位置
[root@master tools]# cp /usr/share/mysql/my-default.cnf /etc/my.cnf
[root@master tools]#cp -a /usr/share/mysql/mysql.server /etc/init.d/mysqld
6.初始化MySQL
[root@master tools]# /usr/bin/mysql_install_db
7.启动MySQL
[root@master mysql]# /etc/init.d/mysql restart
安装的时候参考了http://www.linuxidc.com/Linux/2015-04/116003.htm
CentOS6.5上安装MySQL的更多相关文章
- 在linux(CentOS-6.7_x86_64)上安装mysql成功记录
查看linux服务器的yum源设置: [root@hadoop03 yum.repos.d]# cd /etc/yum.repos.d [root@hadoop03 yum.repos.d]# ll ...
- centos6.5上安装5.7版本的mysql
centos6.5上安装5.7版本的mysql https://www.cnblogs.com/lzj0218/p/5724446.html 设置root可以在本机以外的机器访问 mysql -uro ...
- centos6.5下安装mysql
http://www.centoscn.com/mysql/2014/0812/3481.html 1.使用yum命令安装mysql [root@bogon ~]# yum -y install m ...
- 阿里云服务器上安装mysql的心路历程(博友们进来看看哦)
在阿里云花了100买了一台云服务器,配置如下: CPU: 1核 内存: 512MB 数据盘: 0G 带宽: 1Mbps 阿里云服务器安装mysql搞得我想吐血,搞了一个多星期,现在才搞好,而且,还有许 ...
- CentOS6.7上安装Mysql5.7
CentOS6.7上安装Mysql5.7 2017年07月22日 18:27:05 阅读数:564 环境的配置总是令人作呕,所以这次表明版本条件: 首先,这是一台新机器 其次,CentOS版本如下: ...
- 建站笔记1:centos6.5下安装mysql
近期买了个域名,想要玩玩自己建站点:接下来遇到的问题都会一次记录下来.以备自己以后复习查看: 首先建站方案选择: wordPress +centos6.5 +mysql; server买的:搬瓦工最低 ...
- centos6.4下安装mysql
一.mysql简介 说到数据库,我们大多想到的是关系型数据库,比如mysql.oracle.sqlserver等等,这些数据库软件在windows上安装都非常的方便,在Linux上如果要安装数据库,咱 ...
- 最新版CentOS6.5上安装部署ASP.NET MVC4和WebApi
最新版CentOS6.5上安装部署ASP.NET MVC4和WebApi 使用Jexus5.8.1独立版 http://www.linuxdot.net/ ps:该“独立版”支持64位的CentOS ...
- Ubuntu上安装MySql过程,以及遇到的一些问题
今天在Ubuntu服务器上安装MySql的时候遇到了一些问题,记录下来,以防以后忘记. 安装环境:Ubuntu14.04 安装命令: //安装Mysal服务端//会提示输入root密码 sudo ap ...
随机推荐
- Docker Swarm bind 数据持久化
Docker Swarm bind 数据持久化 bind:主要将工作节点宿主级文件或目录,同步挂载到容器中. 环境: 系统:Centos 7.4 x64 应用版本:Docker 18.09.0 管理节 ...
- Python GIL锁
GIL全局解释器锁:为了解决多线程修改同一块数据. python的线程是调用操作系统的源生线程,启动时就是调用C语言的C源生接口,python调用C语言接口的线程去执行任务时,必须上下文对应关系传给C ...
- 腾讯云centos7.2安装jdk1.7 tomcat7.0部署项目示例
说实话win server的性能并不好,所以程序员必须会在Linux上安装环境,部署项目. 第一步,官网下载tomcat和jdk压缩文件*.tar.gz 下载路径如下: jdk:http://www ...
- 彻底删除windows残留启动引导
在win7/Win8系统下安装其他系统或者一键重装系统后,安装的系统删除或者一键重装文件删除了,在windows启动管理器中还残留了启动引导选项,影响开机效率. 在系统配置中有些"引导&qu ...
- PTA编程总结3—抓老鼠啊~亏了还是赚了?
题目: 某地老鼠成灾,现悬赏抓老鼠,每抓到一只奖励10元,于是开始跟老鼠斗智斗勇:每天在墙角可选择以下三个操作:放置一个带有一块奶酪的捕鼠夹(T),或者放置一块奶酪(C),或者什么也不放(X).捕鼠夹 ...
- CSS粘住固定底部的5种方法
本文主要介绍一个Footer元素如何粘住底部,使其无论内容多或者少,Footer元素始终紧靠在浏览器的底部.我们知道,当内容足够多可以撑开底部到达浏览器的底部,如果内容不够多,不足以撑开元素到达浏览器 ...
- Mock.js 虚拟接口 数据模拟
Mock.js 是一款前端开发中拦截Ajax请求再生成随机数据响应的工具.可以用来模拟服务器响应. 优点是非常简单方便, 无侵入性, 基本覆盖常用的接口数据类型. 大概记录下使用过程, 详细使用可以参 ...
- 正则化,L1,L2
机器学习中在为了减小loss时可能会带来模型容量增加,即参数增加的情况,这会导致模型在训练集上表现良好,在测试集上效果不好,也就是出现了过拟合现象.为了减小这种现象带来的影响,采用正则化.正则化,在减 ...
- Lambda的前世今生
先看一段代码吧 class Student{ delegate void Say(string content); public void Show() { //Lambda的前世今生 //总结:La ...
- 【转】 ISP-镜头阴影校正(LSC)
转自:https://blog.csdn.net/xiaoyouck/article/details/77206505 介绍镜头阴影校正(Lens Shading Correction)是为了解决由于 ...