在 centos6 安装 MySQL5.7 官方文档
Adding the MySQL Yum Repository
First, add the MySQL Yum repository to your system's
repository list. Follow these steps:Go to the download page for MySQL Yum repository at
https://dev.mysql.com/downloads/repo/yum/.Select and download the release package for your
platform.Install the downloaded release package with the
following command, replacing
platform-and-version-specific-package-name
with the name of the downloaded package:Press CTRL+C to copyshell> sudo rpm -Uvh platform-and-version-specific-package-name.rpmFor example, for version
nof
the package for EL6-based systems, the command is:Press CTRL+C to copyshell> sudo rpm -Uvh mysql80-community-release-el6-n.noarch.rpm
NoteOnce the release package is installed on your system, any
system-wide update by the yum update
command (or dnf upgrade for dnf-enabled
systems) will automatically upgrade MySQL packages on your
system and also replace any native third-party packages, if
Yum finds replacements for them in the MySQL Yum repository.
See Upgrading MySQL with the MySQL Yum Repository and
Replacing a Native Third-Party Distribution of MySQL for details.Selecting a Release Series
When using the MySQL Yum repository, the latest GA release of
MySQL is selected for installation by default. If this is what
you want, you can skip to the next step,
Installing MySQL with Yum.Within the MySQL Yum repository
(https://repo.mysql.com/yum/),
different release series of the MySQL Community Server are
hosted in different subrepositories. The subrepository for the
latest GA series (currently MySQL 8.0)is enabled by default, and the subrepositories for all other
series (for example, the MySQL 5.7 series) are
disabled by default. Use this command to see all the
subrepositories in the MySQL Yum repository, and see which of
them are enabled or disabled (for dnf-enabled systems, replace
<span class="command"><strong>yum</strong></span> in the command with
<span class="command"><strong>dnf</strong></span>):
Press CTRL+C to copyshell> yum repolist all | grep mysqlTo install the latest release from the latest GA series, no
configuration is needed. To install the latest release from a
specific series other than the latest GA series, disable the
subrepository for the latest GA series and enable the
subrepository for the specific series before running the
installation command. If your platform supports the
yum-config-manager or dnf
config-manager command, you can do that by issuing,
for example, the following commands, which disable the
subrepository for the 8.0 series and enable the
one for the 5.7 series; for platforms that are
not dnf-enabled:Press CTRL+C to copyshell> sudo yum-config-manager --disable mysql80-community
shell> sudo yum-config-manager --enable mysql57-communityFor dnf-enabled platforms:
Press CTRL+C to copyshell> sudo dnf config-manager --disable mysql80-community
shell> sudo dnf config-manager --enable mysql57-communityBesides using yum-config-manager or the
dnf config-manager command, you can also
select a series by editing manually the
/etc/yum.repos.d/mysql-community.repo
file. This is a typical entry for a release series'
subrepository in the file:Press CTRL+C to copy[mysql80-community]
name=MySQL 8.0 Community Server
baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysqlFind the entry for the subrepository you want to configure,
and edit the <code class="option">enabled</code> option. Specify
<code class="option">enabled=0</code> to disable a subrepository, or
<code class="option">enabled=1</code> to enable a subrepository. For
example, to install MySQL 5.7, make sure you
have <code class="option">enabled=0</code> for the above subrepository
entry for MySQL 8.0, and have
<code class="option">enabled=1</code> for the entry for the
5.7 series:
</p><div class="copytoclipboard-wrapper" style="position: relative;"><pre class="programlisting line-numbers language-ini"><div class="docs-select-all right" id="sa47436371" style="display: none;"><div class="copy-help left" style="display: none;">Press CTRL+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class=" language-ini"><span class="token comment" spellcheck="true"># Enable to use MySQL 5.7</span>
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
You should only enable subrepository for one release series at
any time. When subrepositories for more than one release
series are enabled, the latest series will be used by Yum.
Verify that the correct subrepositories have been enabled and
disabled by running the following command and checking its
output (for dnf-enabled systems, replace
yum in the command with
dnf):
Press CTRL+C to copyshell> yum repolist enabled | grep mysql
Installing MySQL
Install MySQL by the following command (for dnf-enabled
systems, replace yum in the command with
dnf):
Press CTRL+C to copyshell> sudo yum install mysql-community-server
This installs the package for the MySQL server, as well as
other required packages.
Starting the MySQL Server
Start the MySQL server with the following command:
Press CTRL+C to copyshell> sudo service mysqld start
For EL7-based platforms, this is the preferred command:
Press CTRL+C to copyshell> sudo systemctl start mysqld.service
You can check the status of the MySQL server with the
following command:
Press CTRL+C to copyshell> sudo service mysqld status
For EL7-based platforms, this is the preferred command:
Press CTRL+C to copyshell> sudo systemctl status mysqld.service
MySQL Server Initialization (as of MySQL
5.7): At the initial start up of the server, the
following happens, given that the data directory of the server
is empty:
The server is initialized.
An SSL certificate and key files are generated in the data
directory.The validate_password
plugin is installed and enabled.A superuser account
'root'@'localhost'
is created. A password for the superuser is set and stored
in the error log file. To reveal it, use the following
command:Press CTRL+C to copyshell> sudo grep 'temporary password' /var/log/mysqld.logChange the root password as soon as possible by logging in
with the generated, temporary password and set a custom
password for the superuser account:Press CTRL+C to copyshell> mysql -uroot -pPress CTRL+C to copymysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';
MySQL's
validate_password
plugin is installed by default. This will require that
passwords contain at least one upper case letter, one lower
case letter, one digit, and one special character, and that
the total password length is at least 8 characters.
在 centos6 安装 MySQL5.7 官方文档的更多相关文章
- linux安装oracle的官方文档
1:https://docs.oracle.com/cd/E11882_01/install.112/e47689/toc.htm 2:https://oracle-base.com/articles ...
- MySQL8.0.28安装教程全程参考MySQL官方文档
前言 为了MySQL8.0.28安装教程我竟然在MySQL官方文档逛了一天,至此献给想入门MySQL8.0的初学者.以目前最新版本的MySQL8.0.28为示例进行安装与初步使用的详细讲解,面向初学者 ...
- CentOS7.3利用kubeadm安装kubernetes1.7.3完整版(官方文档填坑篇)
安装前记: 近来容器对企业来说已经不是什么陌生的概念,Kubernetes作为Google开源的容器运行平台,受到了大家的热捧.搭建一套完整的kubernetes平台,也成为试用这套平台必须迈过的坎儿 ...
- 在 Ubuntu 上安装 TensorFlow (官方文档的翻译)
本指南介绍了如何在 Ubuntu 上安装 TensorFlow.这些指令也可能对其他 Linux 变体起作用, 但是我们只在Ubuntu 14.04 或更高版本上测试了(我们只支持) 这些指令. 一 ...
- kafka安装配置及操作(官方文档)http://kafka.apache.org/documentation/(有单节点多代理配置)
https://www.cnblogs.com/biehongli/p/7767710.html w3school https://www.w3cschool.cn/apache_kafka/apac ...
- selenium安装及官方文档
selenium-python官方文档: https://selenium-python.readthedocs.io/ python3.5已安装的情况下,安装示意图如下 命令行输入 pip3 ins ...
- ubuntu16.04下snort的安装(官方文档安装)(图文详解)
不多说,直接上干货! 最近为了科研,需要安装和使用Snort. snort的官网 https://www.snort.org/ Snort作为一款优秀的开源主机入侵检测系统,在windows和Linu ...
- ubuntu14.04下snort的安装(官方文档安装)(图文详解)
不多说,直接上干货! 最近为了科研,需要安装和使用Snort. snort的官网 https://www.snort.org/ Snort作为一款优秀的开源主机入侵检测系统,在windows和Linu ...
- 【Phabricator】教科书一般的Phabricator安装教程(配合官方文档并带有踩坑解决方案)
随着一声惊雷和滂沱的大雨,我的Phabricator页面终于在我的学生机上跑了起来. 想起在这五个小时内踩过的坑甚如大学隔壁炮王干过的妹子,心里的成就感不禁油然而生. 接下来,我将和大家分享一下本人在 ...
随机推荐
- Vue UI API简单笔记
VUE UI 目录 VUE UI 一 移动端常用UI组件库 二 PC端常用UI组件库 三 ElementUI组件按需引入 一 移动端常用UI组件库 Vant http://vant-contrib.g ...
- 从这3个方面考虑BI工具,选型一选一个准
BI工具在很多场合都能听到,那么BI工具有什么功能呢?能给企业带来什么?好用的BI工具长什么样?今天跟着小编走近BI工具,一探究竟! 首先要了解BI工具的定义,什么是BI工具.BI工具是指利用现代数据 ...
- 大数据BI系统挖掘企业业务上的价值
相信关注过我们的肯定知道BI是什么,但是老话常谈以防新朋友不知道BI的含义,BI(Business Intelligence)即商务智能,它是一套完整的解决方案,用来将企业中现有的数据进行有效的整合 ...
- 如何利用Smartbi做数据分析:2018内5月热销乘用车分析报告
在2018年第一季度热销乘用车分析报告中,SUV以总体销量15.4%的同比增长率让人不可小觑,Smartbi刚得到5月分析的数据就迫不及待的来看看是否热度不减,结果在5月这个所谓汽车销售淡季,轿车以9 ...
- 关于设备控制器和 I/O 通道的理解
设备控制器 设备控制器是CPU 与 I/O 设备之间的接口,它接收 CPU 发来的命令,去控制 I/O 设备工作,使 CPU 从繁杂的设备控制事务中解放出来. 当 CPU 要操作 I/O 设备时,首先 ...
- 一张图看懂IaaS, PaaS和SaaS的区别
转至:https://blog.csdn.net/liujg79/article/details/84453736 编译:老夫子 原文:https://www.bmc.com/blogs/saas-v ...
- Linux下安装mysql你又踩过多少坑【宇宙最全教程】
一.检查以前是否安装过MySql 因为cnetos7一般默认安装mariadb,所以要检查mysql或者mariadb是否安装 rpm -pa | grep -i mysql rpm -pa | gr ...
- Bugku CTF_web3
1.打开网页,得到信息如下 2.在hackbar里构造url如下 3.得到flag 4.本题的考点在于读的懂PHP代码,并且学会构造get参数.
- 使用 yapi-to-typescript 生成接口响应数据的 TS 类型声明
TS 是越写越爽,但是很不爽的是接口响应数据一堆,每次要去手写很麻烦. 最近正好后端接口文档从一个垃圾工具切换到了 Yapi,然后去搜了下可以通过接口文档自动生成 TS 类型声明,就自己搞了下,还是很 ...
- 面试官:Redis中有序集合的内部实现方式是什么?
面试官:Redis中基本的数据类型有哪些? 我:Redis的基本数据类型有:字符串(string).哈希(hash).列表(list).集合(set).有序集合(zset). 面试官:有序集合的内部实 ...