安装教程

1、下载mysql的repo源

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
可能遇见的问题:wget未找到命令

解决方案:yum -y install wget

      2、安装mysql-community-release-el7-5.noarch.rpm包
       sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
安装完这个包后,会获得两个mysql的yum repo源:/etc/yum.repos.d/mysql-community.repo,/etc/yum.repos.d/mysql-community-source.repo。
       3、安装mysql
       sudo yum install mysql-server

安装完的配置

1、加入开机启动
       systemctl enable mysqld
       2、启动mysql服务进程
       systemctl start mysqld
       3、重置密码
       [root@localhost ~]# 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):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
You already have a root password set, so you can safely answer ‘n’.
Change the root password? [Y/n] y [设置root用户密码]
New password:
Re-enter new password:
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 [删除匿名用户]
… 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] n [禁止root远程登录]
… skipping.
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] y [删除test数据库]
- Dropping test database…
ERROR 1008 (HY000) at line 1: Can’t drop database ‘test’; database doesn’t exist
… Failed! Not critical, keep moving…
- 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 [刷新权限]
… Success!
All done! If you’ve completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
Cleaning up…

4、授权远程登录
       (1)登录mysql数据库 Mysql -u root -p

       (2)授权登录
  登录mysql之后执行
  GRANT ALL PRIVILEGS ON . TO ‘ROOT’@’%’ IDENTIFIED BY ‘PASSWORD’ WITH GRANT OPTION;(注:此处的password指的是root用户的密码)
  GRANT ALL PRIVILEGS ON . TO ‘ROOT’@’%’ IDENTIFIED BY ‘123456’ WITH GRANT OPTION;

      5、开放防火墙端口
       firewall-cmd –add-port=3306/tcp –permanent

      6、重启防火墙
       service firewalld restart

Centos7安装mysql5.6教程相关推荐

  1. centos安装mysql5.7.19_Linux下Centos7安装Mysql5.7.19的详细教程

    1.下载mysql 2.选择源码包,通用版点击下载 直接下载就可以了,不用登录 3.解压编译 tar -zxvf mysql-5.7.19.tar.gz cd mysql-5.7.19.tar.gz ...

  2. Linux下Centos7以rpm方式离线安装MySQL5.7教程以及部分报错解决方案

    Linux下Centos7以rpm方式离线安装MySQL5.7教程以及部分报错解决方案 参考文章: (1)Linux下Centos7以rpm方式离线安装MySQL5.7教程以及部分报错解决方案 (2) ...

  3. centos7安装mysql5.7.16_Linux学习三Centos7安装mysql5.7.16数据库的详细教程

    这篇文章主要为大家详细介绍了Linux学习第三篇,Centos7安装mysql5.7.16数据库,具有一定的参考价值,感兴趣的小伙伴们可以参考一下 如果您有服务器咨询问题.购买问题.可以联系我们客服 ...

  4. centos7安装mysql5.7视频_Centos7安装MySQL5.7版本详细步骤

    Centos7安装MySQL5.7版本详细步骤 Centos7安装MySQL5.7版本详细步骤 目录 1.安装前准备: 2. 安装mysql 2.1 下载并安装mysql官方的yum源 2.2 安装m ...

  5. mysql 6.5安装_RedHat6.5安装MySQL5.7教程详解

    RedHat6.5安装MySQL5.7教程分享,供大家参考,具体内容如下 安装环境:RedHat6.5 第一步:下载 下载MySQL5.7:http://dev.mysql.com/get/Downl ...

  6. caffe linux 教程,CentOS7安装Caffe的教程详解

    安装依赖包 sudo yum install protobuf-devel leveldb-devel snappy-devel opencv-devel boost-devel hdf5-devel ...

  7. mysql 6.5安装配置,RedHat6.5安装MySQL5.7教程详解

    RedHat6.5安装MySQL5.7教程分享,供大家参考,具体内容如下 安装环境:RedHat6.5 第一步:下载 第二步:安装 安装前检查服务器是否已安装MySQL,如已安装则将其卸载: 将下载的 ...

  8. CentOS7安装mysql5.7.19的手顺,步骤(非常详细)

    CentOS7安装mysql5.7.19手顺 1.首先确认系统是否已经安装了mysql或者mariaDB rpm -qa | grep mysql rpm -qa | grep mariaDB 2.如 ...

  9. Centos7安装mysql-5.7.18-1.el7.x86_64.rpm-bundle.tarCentos7安装mysql-5.7.18-1.el7.x86_64.rpm-bundle.tar

    Centos7安装mysql-5.7.18-1.el7.x86_64.rpm-bundle.tar 2017年07月26日 19:41:21 阅读数:2359 标签: centos7mysql安装 更 ...

最新文章

  1. 《评人工智能如何走向新阶段》后记(再续26)
  2. 再次分享一个多选文件上传方案“.NET研究”
  3. Spring注解详解
  4. 深入JavaScript与.NET Framework中的日期时间(1):基本概念与概述
  5. 音视频直播--技术架构
  6. 速率法和终点法的区别_生化分析仪检测中的终点法、两点法、双波长法有什么区别...
  7. Spring 处理请求和响应相关的注解
  8. 如何通过索引说数据库优化能力
  9. javascript网页自动填表_javascript实现自动填写表单实例简析
  10. 服务器密闭通道天窗维修,机柜及密闭通道技术规范
  11. 笔记本电脑连不上windows无线服务器,笔记本电脑连不上无线如何解决
  12. Python Web 框架-Django day07
  13. centos6使用devtoolset快速升级GCC版本4.8/5.2/8.3
  14. 源码剖析Redis中如何使用跳表的
  15. Mac - was compiled with optimization - stepping may behave oddly; variables may not be available.
  16. 新媒体运营编辑有出路吗
  17. bash: vi: command not found
  18. dockers 的简单使用
  19. C++ 的成功属于意料之外
  20. 面试指导笔记——面试篇

热门文章

  1. sqli——labs初学者通关详
  2. Kotlin学习与实践 (一)WWH (what?why?how)
  3. 2020年8月2日摄影作品-园博园
  4. 用PS将一张暗照片变亮
  5. python基本工资的调整方案_Python薪资又涨了!这可咋办!
  6. protopyte.js ajax
  7. Vert.x - SpringBoot 整合 vertx 使用 thymeleaf、freemarker 模板引擎
  8. linux开启wifi适配器,在Ubuntu 18.04.2系统中配置LT-Rescuer R720无线适配器的方法
  9. 图像复原matlab心得,基于MATLAB的图像复原的论述
  10. 基于PaddlePaddle复现DDRNet23-slim