[root@izbp1buyhgwtrvlxv3u2gqz soft]# wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
--2019-04-18 17:24:29-- http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
Resolving dev.mysql.com (dev.mysql.com)... 137.254.60.11
Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm [following]
--2019-04-18 17:24:30-- https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://repo.mysql.com//mysql57-community-release-el7-8.noarch.rpm [following]
--2019-04-18 17:24:31-- https://repo.mysql.com//mysql57-community-release-el7-8.noarch.rpm
Resolving repo.mysql.com (repo.mysql.com)... 104.127.195.16
Connecting to repo.mysql.com (repo.mysql.com)|104.127.195.16|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9116 (8.9K) [application/x-redhat-package-manager]
Saving to: ‘mysql57-community-release-el7-8.noarch.rpm’

100%[=================================================================================================================================================>] 9,116 --.-K/s in 0s

2019-04-18 17:24:31 (218 MB/s) - ‘mysql57-community-release-el7-8.noarch.rpm’ saved [9116/9116]

[root@izbp1buyhgwtrvlxv3u2gqz soft]# yum localinstall mysql57-community-release-el7-8.noarch.rpm
Loaded plugins: fastestmirror
Examining mysql57-community-release-el7-8.noarch.rpm: mysql57-community-release-el7-8.noarch
Marking mysql57-community-release-el7-8.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package mysql57-community-release.noarch 0:el7-8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================================================
Installing:
mysql57-community-release noarch el7-8 /mysql57-community-release-el7-8.noarch 8.2 k

Transaction Summary
===========================================================================================================================================================================================
Install 1 Package

Total size: 8.2 k
Installed size: 8.2 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mysql57-community-release-el7-8.noarch 1/1
Verifying : mysql57-community-release-el7-8.noarch 1/1

Installed:
mysql57-community-release.noarch 0:el7-8

Complete!
[root@izbp1buyhgwtrvlxv3u2gqz soft]# yum repolist enabled | grep “mysql.-community.”
[root@izbp1buyhgwtrvlxv3u2gqz soft]# yum install mysql-community-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:5.7.25-1.el7 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 5.7.25-1.el7 for package: mysql-community-server-5.7.25-1.el7.x86_64
--> Processing Dependency: mysql-community-client(x86-64) >= 5.7.9 for package: mysql-community-server-5.7.25-1.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-community-server-5.7.25-1.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-community-server-5.7.25-1.el7.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: mysql-community-server-5.7.25-1.el7.x86_64
--> Running transaction check
---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
---> Package mysql-community-client.x86_64 0:5.7.25-1.el7 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.25-1.el7.x86_64
---> Package mysql-community-common.x86_64 0:5.7.25-1.el7 will be installed
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be obsoleted
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
---> Package mysql-community-libs.x86_64 0:5.7.25-1.el7 will be obsoleting
--> Running transaction check
---> Package mysql-community-libs-compat.x86_64 0:5.7.25-1.el7 will be obsoleting
---> Package postfix.x86_64 2:2.10.1-6.el7 will be updated
---> Package postfix.x86_64 2:2.10.1-7.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================================================
Installing:
mysql-community-libs x86_64 5.7.25-1.el7 mysql57-community 2.2 M
replacing mariadb-libs.x86_64 1:5.5.56-2.el7
mysql-community-libs-compat x86_64 5.7.25-1.el7 mysql57-community 2.0 M
replacing mariadb-libs.x86_64 1:5.5.56-2.el7
mysql-community-server x86_64 5.7.25-1.el7 mysql57-community 165 M
Installing for dependencies:
libaio x86_64 0.3.109-13.el7 base 24 k
mysql-community-client x86_64 5.7.25-1.el7 mysql57-community 24 M
mysql-community-common x86_64 5.7.25-1.el7 mysql57-community 274 k
Updating for dependencies:
postfix x86_64 2:2.10.1-7.el7 base 2.4 M

Transaction Summary
===========================================================================================================================================================================================
Install 3 Packages (+3 Dependent packages)
Upgrade ( 1 Dependent package)

Total download size: 196 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/7): libaio-0.3.109-13.el7.x86_64.rpm | 24 kB 00:00:00
warning: /var/cache/yum/x86_64/7/mysql57-community/packages/mysql-community-common-5.7.25-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Public key for mysql-community-common-5.7.25-1.el7.x86_64.rpm is not installed
(2/7): mysql-community-common-5.7.25-1.el7.x86_64.rpm | 274 kB 00:00:00
(3/7): mysql-community-libs-5.7.25-1.el7.x86_64.rpm | 2.2 MB 00:00:00
(4/7): mysql-community-libs-compat-5.7.25-1.el7.x86_64.rpm | 2.0 MB 00:00:00
(5/7): postfix-2.10.1-7.el7.x86_64.rpm | 2.4 MB 00:00:00
(6/7): mysql-community-client-5.7.25-1.el7.x86_64.rpm | 24 MB 00:00:02
(7/7): mysql-community-server-5.7.25-1.el7.x86_64.rpm | 165 MB 00:00:15
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 12 MB/s | 196 MB 00:00:16
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Importing GPG key 0x5072E1F5:
Userid : "MySQL Release Engineering <mysql-build@oss.oracle.com>"
Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5
Package : mysql57-community-release-el7-8.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mysql-community-common-5.7.25-1.el7.x86_64 1/9
Installing : mysql-community-libs-5.7.25-1.el7.x86_64 2/9
Installing : mysql-community-libs-compat-5.7.25-1.el7.x86_64 3/9
Installing : mysql-community-client-5.7.25-1.el7.x86_64 4/9
Installing : libaio-0.3.109-13.el7.x86_64 5/9
Installing : mysql-community-server-5.7.25-1.el7.x86_64 6/9
Updating : 2:postfix-2.10.1-7.el7.x86_64 7/9
Cleanup : 2:postfix-2.10.1-6.el7.x86_64 8/9
Erasing : 1:mariadb-libs-5.5.56-2.el7.x86_64 9/9
Verifying : mysql-community-libs-5.7.25-1.el7.x86_64 1/9
Verifying : mysql-community-libs-compat-5.7.25-1.el7.x86_64 2/9
Verifying : mysql-community-common-5.7.25-1.el7.x86_64 3/9
Verifying : 2:postfix-2.10.1-7.el7.x86_64 4/9
Verifying : mysql-community-server-5.7.25-1.el7.x86_64 5/9
Verifying : mysql-community-client-5.7.25-1.el7.x86_64 6/9
Verifying : libaio-0.3.109-13.el7.x86_64 7/9
Verifying : 1:mariadb-libs-5.5.56-2.el7.x86_64 8/9
Verifying : 2:postfix-2.10.1-6.el7.x86_64 9/9

Installed:
mysql-community-libs.x86_64 0:5.7.25-1.el7 mysql-community-libs-compat.x86_64 0:5.7.25-1.el7 mysql-community-server.x86_64 0:5.7.25-1.el7

Dependency Installed:
libaio.x86_64 0:0.3.109-13.el7 mysql-community-client.x86_64 0:5.7.25-1.el7 mysql-community-common.x86_64 0:5.7.25-1.el7

Dependency Updated:
postfix.x86_64 2:2.10.1-7.el7

Replaced:
mariadb-libs.x86_64 1:5.5.56-2.el7

Complete!
[root@izbp1buyhgwtrvlxv3u2gqz soft]# systemctl start mysqld
[root@izbp1buyhgwtrvlxv3u2gqz soft]# systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2019-04-18 17:27:28 CST; 13s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 13346 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 13273 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 13351 (mysqld)
CGroup: /system.slice/mysqld.service
└─13351 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Apr 18 17:27:22 izbp1buyhgwtrvlxv3u2gqz systemd[1]: Starting MySQL Server...
Apr 18 17:27:28 izbp1buyhgwtrvlxv3u2gqz systemd[1]: Started MySQL Server.
[root@izbp1buyhgwtrvlxv3u2gqz soft]# systemctl enable mysqld
[root@izbp1buyhgwtrvlxv3u2gqz soft]# systemctl daemon-reload

[root@izbp1buyhgwtrvlxv3u2gqz soft]# systemctl daemon-reload
[root@izbp1buyhgwtrvlxv3u2gqz soft]# grep 'temporary password' /var/log/mysqld.log
2019-04-18T09:27:24.224008Z 1 [Note] A temporary password is generated for root@localhost: eGq3wa,L*!_s
[root@izbp1buyhgwtrvlxv3u2gqz soft]# #
[root@izbp1buyhgwtrvlxv3u2gqz soft]# cd /etc/
[root@izbp1buyhgwtrvlxv3u2gqz etc]# ls
adjtime cron.deny ethertypes hosts login.defs nsswitch.conf.bak protocols securetty sysctl.d
aliases cron.hourly exports hosts.allow logrotate.conf ntp python security systemd
aliases.db cron.monthly favicon.png hosts.deny logrotate.d ntp.conf rc0.d selinux system-release
alternatives crontab filesystems init.d lsb-release.d openldap rc1.d services system-release-cpe
anacrontab cron.weekly firewalld inittab machine-id opt rc2.d sestatus.conf terminfo
asound.conf crypttab fstab inputrc machine-info os-release rc3.d shadow timezone
at.deny csh.cshrc gcrypt iproute2 magic pam.d rc4.d shadow- tmpfiles.d
audisp csh.login GeoIP.conf issue mail.rc passwd rc5.d shells tuned
audit dbus-1 GeoIP.conf.default issue.net makedumpfile.conf.sample passwd- rc6.d skel udev
backup default gnupg kdump.conf man_db.conf pkcs11 rc.d ssh vconsole.conf
bash_completion.d depmod.d GREP_COLORS kernel mke2fs.conf pki rc.local ssl vimrc
bashrc dhcp groff krb5.conf modprobe.d plymouth redhat-lsb statetab virc
binfmt.d DIR_COLORS group krb5.conf.d modules-load.d pm redhat-release statetab.d wgetrc
centos-release DIR_COLORS.256color group- ld.so.cache motd polkit-1 resolv.conf subgid wpa_supplicant
centos-release-upstream DIR_COLORS.lightbgcolor grub2.cfg ld.so.conf mtab popt.d rpc subuid X11
chkconfig.d dracut.conf grub.d ld.so.conf.d my.cnf postfix rpm sudo.conf xdg
chrony.conf dracut.conf.d gshadow libaudit.conf my.cnf.d ppp rsyslog.conf sudoers xinetd.d
chrony.keys dracut.conf.d? gshadow- libnl NetworkManager prelink.conf.d rsyslog.d sudoers.d yum
cloud e2fsck.conf gss libuser.conf networks printcap rwtab sudo-ldap.conf yum.conf
cron.d eni_utils host.conf locale.conf nscd.conf profile rwtab.d sysconfig yum.repos.d
cron.daily environment hostname localtime nsswitch.conf profile.d sasl2 sysctl.conf
[root@izbp1buyhgwtrvlxv3u2gqz etc]# vi my.cnf
[root@izbp1buyhgwtrvlxv3u2gqz etc]# systemctl restart mysqld
[root@izbp1buyhgwtrvlxv3u2gqz etc]# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@izbp1buyhgwtrvlxv3u2gqz etc]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.25

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> alter user 'root'@'localhost' identified by 'root123!@#'
-> ;
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> alter user 'root'@'localhost' identified by 'root123!@#';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> SHOW VARIABLES LIKE 'validate_password%'
-> ;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> SHOW VARIABLES LIKE 'validate_password%';

centos7 安装mysql5.7的更多相关文章

  1. Centos7 安装 MySQL5.7

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

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

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

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

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

  4. Centos7安装mysql-5.7.19

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

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

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

  6. centos7安装mysql5.7修改设置密码策略

    centos7操作系统在安装mysql5.7社区版之后会有默认密码,通过grep命令在mysqld.log文件中即可找到,如下所示: 标识位置即在初始化安装时mysql的默认密码,然后通过mysql ...

  7. centos7安装MySQL5.7无法设置密码问题

    前言 在使用centos7系统yum方式安装MySQL5.7后 不知道默认密码是多少  知道后没办法修改? 一.找到MySQL密码 service mysqld start vim /var/log/ ...

  8. centos7 安装 mysql5.7 版本(全)

    centos 安装 版本说明 :centos7,mysql5.7 ,不是 centos7 可能有些命令不兼容 安装 mysql-server # 下载并安装 mysql yum wget -i -c ...

  9. centos7安装mysql5.7(rpm安装版)

    1.下载mysql5.7的rpm安装包 rpm的mysql包,安装起来简单,解压版的mysql还需要做许多配置,稍有不慎就会出错!!! 下载地址:https://dev.mysql.com/downl ...

  10. CentOS7安装MySQL5.7及Tomcat8.5

    在CentOS7服务器上部署FR项目应用 一.安装CentOS-7_x86_64 1.CentOS7:带GUI的服务器(FTP服务器.JAVA平台.兼容性程序库.开发工具.安全性工具.系统管理工具): ...

随机推荐

  1. 【WCF系列】(一)为什么我们需要WCF

    为什么我们需要WCF 传统分布式软件的架构分析 一个开发需求:社保平台 访问量较大客户端类型/平台多和其他系统交互多快速开发/部署结构复杂(B/S.C/S.桌面.服务…) 传统的实现技术: 业界需要一 ...

  2. 【bug】----- Git上传文件错误导致本地代码丢失

    1.问题描述:通过Git上传本地文件,在git commit操作后本地未上传的代码全部丢失... 2.解决: 第一步:在项目目录下打开Git Bash: 第二步:输入 git reflog 第三步:在 ...

  3. Linux基础知识第八讲,系统相关操作命令

    目录 Linux基础知识第八讲,系统相关操作命令 一丶简介命令 2.磁盘信息查看. 3.系统进程 Linux基础知识第八讲,系统相关操作命令 一丶简介命令 时间和日期 date cal 磁盘和目录空间 ...

  4. Java复制、移动和删除文件

    复制文件: Files.copy(fromPath,toPath); 例如: Files.copy(Paths.get("E:\\A.txt"), Paths.get(" ...

  5. Docker多主机管理(八)--技术流ken

    docker多主机管理 前面我们的实验环境中只有一个 docker host,所有的容器都是运行在这一个 host 上的.但在真正的环境中会有多个 host,容器在这些 host 中启动.运行.停止和 ...

  6. (3)Maven快速入门_3在Eclipse中创建Maven项目打包成jar

    Eclipse中创建Maven项目 new ---> maven project  ----> next 如下 普通java项目 选择  如下 quickstart 创建项目 : 输入 G ...

  7. 讲讲跳跃表(Skip Lists)

    跳跃表(Skip Lists)是一种有序的数据结构,它通过在每个节点中维持多个指向其他节点的指针,从而达到快速访问节点的目的.在大部分情况下,跳跃表的效率可以和平衡树相媲美,并且在实现上比平衡树要更为 ...

  8. 环境搭建 - Java(Windows)

    Java开发环境搭建 本文以window7下搭建JDK8示例,其他版本无特殊说明同理. 下载JDK安装包 网址:JDK8     非C盘下根目录新建文件夹:Java D:\Java 安装JDK至Jav ...

  9. JavaScript是如何工作的: Web推送通知的机制

    摘要: 如何在Web端推送消息? 这是专门探索 JavaScript 及其所构建的组件的系列文章的第9篇. 如果你错过了前面的章节,可以在这里找到它们: JavaScript是如何工作的:引擎,运行时 ...

  10. latex数学公式

    https://khan.github.io/KaTeX/function-support.html 最近要写<具体数学>的读书笔记,发现好多数学符号不会打啊qwq.. 大于号:\geqs ...