CentOS7安装mysql5.6.23 (glibc)

一.下载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

二.安装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
时间: 2024-10-11 04:56:18

CentOS7安装mysql5.6.23 (glibc)的相关文章

CentOS7安装mysql5.6.23 -(转)

一.下载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代

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

转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/44785511 ************************************************************         CentOS6.5_64bit下编译安装MySQL-5.6.23 **************************************************************一.关闭防火墙chkconfig iptable

Ubuntu18.04编译安装mysql5.7.23

本博客为源码安装mysql5.7.23案例全过程 环境ubuntu18.04 安装规划: 配置文件:/etc/my.cnf 数据目录:/r2/mysqldata 安装目录:/usr/local/mysql 1.下载mysql-boost wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-boost-5.7.23.tar.gz 2.安装工具 sudo apt-get install cmake -y apt-get install gcc

Linux Centos7安装MySQL5.5(二进制方式安装)

Linux Centos7安装MySQL5.5(二进制方式安装)一.在/app目录下下载mysql-5.5.54-linux2.6-x86_64.tar.gz`[[email protected] /]# cd /app[[email protected] app]# wget http://mirrors.sohu.com/mysql/MySQL-5.5/mysql-5.5.54-linux2.6-x86_64.tar.gz二.解压mysql-5.5.54-linux2.6-x86_64.ta

CentOS7安装mysql5.7

在 CentOS7 上安装 MySQL5.7 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中:cd /usr/local/ 3 创建目录 /usr/local/tools,如果有则忽略: mkdir -p tools 4 创建 /usr/local/mysql 目录,如果已存在则忽略:mkdir -p mysql 5 进入到目录 /usr/local/tools 中:cd tools/ 6 查看系统中是否已安装 MySQL 服务:

CentOS7安装MySQL5.7数据库以及配置

  一.MySQL5.7主要特性: 原生架构支持centos7的Systemd (1.)更好的性能:对于多核的CPU.固态硬盘.锁有着更好的优化.更好的innoDB存储引擎. (2.)更为健壮的复制功能:复制带来了数据完全不丢失的方案,传统金融客户也 可以选择使用MySQL数据库. (3.)新增sys库:以后这会是DBA访问最频繁的库 (4.)更好的优化器:优化器的代码重构的意义将在5.7版本及以后的版本中带来巨大的改进 oracle官方正在解决MySQL之前最大的难题,原生JSON类型的支持

Centos 6.6 编译安装MySQL-5.6.23

1.下载官方源码 MySQL:wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.23.tar.gz Cmake:wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.23.tar.gz 2.编译安装MySQL前的准备工作 sudo yum install gcc gcc-c++ ncurses-devel perl -y 3.编译安装cmake tar xzvf

编译安装MySQL5.6.23

一.卸载旧版本 二.下载.编译.安装mysql 三.配置mysql 四.其他 一.卸载旧版本 检查当前主机上是否安装了mysql [[email protected] php-5.4.41]# rpm -qa | grep mysql mysql-libs-5.1.71-1.el6.x86_64 rpm -e mysql-libs.x86_64    #删除 或者 rpm -e --nodeps mysql-libs.x86_64    #强制删除 二.下载.编译.安装mysql 1.安装编译代

如何用CentOS7安装MySQL5.7(RPM安装)

 一. MySQL 5.7 主要特性: 原生支持 Systemd 更好的性能:对于多核 CPU .固态硬盘.锁有着更好的优化 更好的 InnoDB 存储引擎 更为健壮的复制功能:复制带来了数据完全不丢失的方案,传统金融客户也可以选择使用MySQL 数据库. 注: mysql-5.6.3 已经支持了多线程的主从复制 新增 sys 库:以后这会是 DBA 访问最频繁的库 二.MySQL版本 SQL结构化查询语言 社区版Community Edition.商业版Enterprise Edition A