centos7 安装mysql5.7
[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的更多相关文章
- Centos7 安装 MySQL5.7
Centos7 安装 MySQL5.7 一.环境介绍 1.安装包版本介绍 MySQL 有三种安装方式:RPM安装.二进制包安装.源码包安装.我们这篇文章以二进制方式安装MySQL 软件名称 版本 系统 ...
- centos7安装mysql5.7.19及配置远程连接
centos7安装mysql5.7.19及配置远程连接------https://blog.csdn.net/Lh19931122/article/details/77996213
- Linux学习第三步(Centos7安装mysql5.7数据库)
版本:mysql-5.7.16-1.el7.x86_64.rpm-bundle.tar 前言:在linux下安装mysql不如windows下面那么简单,但是也不是很难.本文向大家讲解了如何在Cent ...
- Centos7安装mysql-5.7.19
Centos7安装Mysql 一 mysql下载 地址: https://dev.mysql.com/downloads/mysql/#downloads 二 在centos7上创建安装文件存放.解压 ...
- Centos7安装Mysql5.7方法总结 - 实操手册
Centos7.x版本下针对Mysql的安装和使用多少跟之前的Centos6之前版本有所不同的,废话就不多赘述了,下面介绍下在centos7.x环境里安装mysql5.7的几种方法:一.yum方式安装 ...
- centos7安装mysql5.7修改设置密码策略
centos7操作系统在安装mysql5.7社区版之后会有默认密码,通过grep命令在mysqld.log文件中即可找到,如下所示: 标识位置即在初始化安装时mysql的默认密码,然后通过mysql ...
- centos7安装MySQL5.7无法设置密码问题
前言 在使用centos7系统yum方式安装MySQL5.7后 不知道默认密码是多少 知道后没办法修改? 一.找到MySQL密码 service mysqld start vim /var/log/ ...
- centos7 安装 mysql5.7 版本(全)
centos 安装 版本说明 :centos7,mysql5.7 ,不是 centos7 可能有些命令不兼容 安装 mysql-server # 下载并安装 mysql yum wget -i -c ...
- centos7安装mysql5.7(rpm安装版)
1.下载mysql5.7的rpm安装包 rpm的mysql包,安装起来简单,解压版的mysql还需要做许多配置,稍有不慎就会出错!!! 下载地址:https://dev.mysql.com/downl ...
- CentOS7安装MySQL5.7及Tomcat8.5
在CentOS7服务器上部署FR项目应用 一.安装CentOS-7_x86_64 1.CentOS7:带GUI的服务器(FTP服务器.JAVA平台.兼容性程序库.开发工具.安全性工具.系统管理工具): ...
随机推荐
- [二]基础数据类型之Long详解
Long Long 基本数据类型long 的包装类 Long 类型的对象包含一个 long类型的字段 属性简介 值为 263-1 的常量,它表示 long 类型能够表示的最大值 ...
- [八]基础数据类型之Double详解
Double 基本数据类型double 的包装类 Double 类型的对象包含一个 double 类型的字段 属性简介 用来以二进制补码形式表示 double 值的比特位数 public sta ...
- Servlet主要相关类核心类 容器调用的过程浅析 servlet解读 怎么调用 Servlet是什么 工作机制
WEB简介 Web项目 是 B/S结构 浏览器/服务器模式的 浏览器发起请求,服务器作出响应 请求的发起和响应使用HTTP协议进行通讯 所谓协议也就是一种固定格式 而Socket是应用 ...
- Java提高班(二)深入理解线程池ThreadPool
本文你将获得以下信息: 线程池源码解读 线程池执行流程分析 带返回值的线程池实现 延迟线程池实现 为了方便读者理解,本文会由浅入深,先从线程池的使用开始再延伸到源码解读和源码分析等高级内容,读者可根据 ...
- spring学习(五) ———— 整合web项目(SSM)
一.SSM框架整合 1.1.整合思路 从底层整合起,也就是先整合mybatis与spring,然后在编写springmvc. 1.2.开发需求 查询商品列表(从数据库中查询) 1.3.创建web工程 ...
- C#工具:Bootstrap WPF Style,Bootstrap风格的WPF样式
简介 GitHub地址:https://github.com/ptddqr/bootstrap-wpf-style 此样式基于bootstrap-3.3.0,样式文件里的源码行数都是指的这个版本.CS ...
- WPF 客户端浏览器 添加Loading加载进度
在windows开发界面时,使用浏览器来请求和显示网页内容,是比较常见的. 但是在请求网页内容时,因网速或者前端功能复杂加载较慢,亦或者加载时遇到各种问题,如空白/黑屏/加载不完整/证书问题等. 因此 ...
- PHP 中的Trait
概述 在PHP中有一种代码复用的技术, 因为单继承的问题, 有些公共方法无法在父类中写出, 而 Trait可以应对这种情况, 它可以定义一些复用的方法, 然后在你需要使用的类中将其引入即可. 刚开始的 ...
- mybatis基础(下)
mybatis和spring整合 需要spring通过单例方式管理SqlSessionFactory spring和mybatis整合生成代理对象,使用SqlSessionFactory创建SqlSe ...
- 通过 docker 来搭建 Jenkins
mkdir /data/jenkins -p mkdir /data/jenkins/{conf,data} -p echo "Asia/Shanghai" > /data/ ...