一.下载glibc版本的Mysql

  mysql-advanced-5.6.23-linux-glibc2.5-x86_64.zip

  解压后,得到 mysql-advanced-5.6.23-linux-glibc2.5-x86_64.tar.gz

二.创建Mysql用户

adduser mysql
passwd mysql

  注意,glibc版本的Mysql,不是编译版的,是直接编译好的,相当于windows的绿色版

  CentOS默认yum源已经没有mysql-server了.而用mariadb代替,而2个数据库冲突,所以要安装mysql,要先卸载mariadb

  把mysql-advanced-5.6.23-linux-glibc2.5-x86_64.tar.gz上传到服务器

tar zxvf mysql-advanced-5.6.23-linux-glibc2.5-x86_64.tar.gz
mv mysql-advanced-5.6.23-linux-glibc2.5-x86_64 mysql5.6.23
cd mysql5.6.23
#初始化mysql数据库
scripts/mysql_install_db --user=mysql

三.开启mysql

bin/mysqld_safe --user=mysql

四.执行安全设置

#bin/mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here. Enter current password for root (enter for none):<---输入现在的root密码,因为我们还没设置,直接回车
OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation. Set root password? [Y/n] Y <---是否设定root密码,当然设置了,输入Y回车
New password: <---输入root密码,并回车,输入的过程中不会有任何显示
Re-enter new password: <---再次输入root密码,并回车,输入的过程中不会有任何显示
Password updated successfully!
Reloading privilege tables..
... Success! By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment. Remove anonymous users? [Y/n] Y <---是否删除匿名用户,删除,输入Y回车
... Success! Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] Y <---是否删禁止root用户远程登录,当然禁止,输入Y回车
... Success! By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment. Remove test database and access to it? [Y/n] <---是否删除测试数据库test,删除,输入Y回车
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success! Reloading the privilege tables will ensure that all changes made so far
will take effect immediately. Reload privilege tables now? [Y/n] Y <---刷新权限,输入Y回车
... Success! Cleaning up... All done! If you've completed all of the above steps, your MySQL
installation should now be secure. Thanks for using MySQL!

常用命令

#关闭mysql
mysqladmin shutdown
#或
mysqladmin -uroot -p shutdown 转自:http://www.cnblogs.com/kreo/p/4392090.html

CentOS7安装mysql5.6.23 -(转)的更多相关文章

  1. CentOS7安装mysql5.6.23

    ============安装glibc版本============== 一.下载glibc版本的Mysql mysql-advanced-5.6.23-linux-glibc2.5-x86_64.zi ...

  2. Centos7 安装 MySQL5.7

    Centos7 安装 MySQL5.7 一.环境介绍 1.安装包版本介绍 MySQL 有三种安装方式:RPM安装.二进制包安装.源码包安装.我们这篇文章以二进制方式安装MySQL 软件名称 版本 系统 ...

  3. CentOS6.5_64bit下编译安装MySQL-5.6.23

    转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/44785511 ************************************** ...

  4. centos7安装mysql5.7.19及配置远程连接

    centos7安装mysql5.7.19及配置远程连接------https://blog.csdn.net/Lh19931122/article/details/77996213

  5. 学以致用二十七-----Centos7.5二进制安装mysql5.7.23

    首先去官网查看mysql版本.才一个礼拜不到,我之前下载的是mysql5.7.23,现在在官网页面已然找不到了,只有5.7.24版本,不得不说更新真快.不过我下载的是mysql5.7.23,所以还是安 ...

  6. Centos7安装Mysql5.7方法总结 - 实操手册

    Centos7.x版本下针对Mysql的安装和使用多少跟之前的Centos6之前版本有所不同的,废话就不多赘述了,下面介绍下在centos7.x环境里安装mysql5.7的几种方法:一.yum方式安装 ...

  7. centos7 安装mysql5.7及配置

    一.Mysql 各个版本区别:1.MySQL Community Server 社区版本,开源免费,但不提供官方技术支持.2.MySQL Enterprise Edition 企业版本,需付费,可以试 ...

  8. Linux学习第三步(Centos7安装mysql5.7数据库)

    版本:mysql-5.7.16-1.el7.x86_64.rpm-bundle.tar 前言:在linux下安装mysql不如windows下面那么简单,但是也不是很难.本文向大家讲解了如何在Cent ...

  9. Centos7安装mysql-5.7.19

    Centos7安装Mysql 一 mysql下载 地址: https://dev.mysql.com/downloads/mysql/#downloads 二 在centos7上创建安装文件存放.解压 ...

随机推荐

  1. 初次使用SVN心得

    进入实验室, 一个项目往往需要多天多人次共同维护,所以版本控制也显得尤为关键.下面是我第一次使用SVN工具的心得体会. 首先是安装,服务器搭配方面应该是之前完成的,这里就不多讲了. 下载地址:http ...

  2. NET中级课--浅谈委托,事件,异步调用,回调等概念

    直接说题. 委托         首先明确它是什么,其实就是一个类,定义一个委托即定义一个类,那么它是什么类?用来说明方法的类型的类.字段有类型,那么方法其实也有类型,就是委托.       委托是某 ...

  3. C#管理IIS中的站点

    原文:http://www.knowsky.com/534237.html Microsoft自Windows Vista一起发布了IIS 7.0,这个已经是去年的话题了,随后,由.NET开发的Web ...

  4. weblogic开机启动脚本

    1.在/home/bea/startBeaAll目录内创建一个startBeaAll.sh文件,加入如下内容(把相应目录与命令修改即可,红字部分为修改地方): #!/bin/sh echo " ...

  5. iOS 面试题 3

    0.请写出代码,用blocks来取代上例中的protocol,并比较两种方法的优势.实际应用部分?请写出代码,用blocks取代协议或回调方法 声明: #import <Foundation/F ...

  6. ARM指令和Thumb指令区别

    Thumb指令集 ]的问题而提出的,它具有16为的代码密度.Thumb不是一个完整的体系结构,不能指望处理程序只执行Thumb指令而不支持ARM指令集.因此,Thumb指令只需要支持通用功能,必要时, ...

  7. (转)ultraedit for linux 安装与注册破解

    http://hi.baidu.com/simonwoos_zone/item/93f88b41dbad48e41e19bcc8

  8. FTP进行上传下载文件

    1.需要引入外部jar包:commons-net-2.0.jar(或者是子包commons-net-ftp-2.0.jar) 2.需下载ftp服务器 3. 本地电脑访问ftp服务器格式:ftp://用 ...

  9. [汇编语言]-第十章 ret,retf,call指令

    1- ret 相当于 pop IP;用栈中数据,修改IP内容.从而实现近转移. 执行后(IP)=0, CS:IP指向代码段的第一条指令. assume cs:code stack segment db ...

  10. python - list, cllections模块的deque对象

    list.count() list.pop()/list.pop(i) list.insert(i,element) list.sort()和sorted(list) list.reverse()和r ...