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平台.兼容性程序库.开发工具.安全性工具.系统管理工具): ...
随机推荐
- 【Java基础】【24多线程(上)】
24.01_多线程(多线程的引入)(了解) 1.什么是线程 线程是程序执行的一条路径, 一个进程中可以包含多条线程 多线程并发执行可以提高程序的效率, 可以同时完成多项工作 2.多线程的应用场景 红蜘 ...
- .Net 使用爬虫下载网络图片到本地磁盘
准备: 1.新建控制台项目 2.引用System.Drawing类库 3.安装HtmlAgilityPack 1.5.2.0 4.如果不会XPath语法的话,建议简单看下 代码: static voi ...
- win2008R2环境配置
1)下载系统 [https://msdn.itellyou.cn/] 选择带sp1的,这个系统是08R2中较为完善的一种 2)安装之后首先不要激活和安装.net framework 先安装ii ...
- 安装VS时,双击setup.exe后界面一闪而过的问题
问题:安装VS时,双击setup.exe界面一闪而过的问题 解决: 百度后说需要到"控制面板/添加和管理程序"关闭系统自带的netframework3.x及以上版本. 1.查看所有 ...
- Djiango初识
加载静态文件 在一个网页中,不仅仅只有一个 html 骨架,还需要 css 样式文件, js 执行文件以及一些图片 等.因此在 DTL 中加载静态文件是一个必须要解决的问题.在 DTL 中,使用 st ...
- Android 使用Picasso加载网络图片等比例缩放
在做android图片加载的时候,由于手机屏幕受限,很多大图加载过来的时候,我们要求等比例缩放,比如按照固定的宽度,等比例缩放高度,使得图片的尺寸比例得到相应的缩放,但图片没有变形.显然按照andro ...
- 两种常用的全排列算法(java)
问题:给出一个字符串,输出所有可能的排列. 全排列有多种算法,此处仅介绍常用的两种:字典序法和递归法. 1.字典序法: 如何计算字符串的下一个排列了?来考虑"926520"这个字符 ...
- MongoDB在已有账号的实例下还原数据库报错的分析(error applying oplog)
一. 背景 今天在MongoDB 4.0.4版本下,在还原恢复数据库时报错. 主要错误为: Failed: restore error: error applying oplog: applyOps: ...
- echarts中legend如何换行
lengend data数据中若存在'',则表示换行,用''切割.
- iOS UITextField 响应键盘的return 事件
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(, , , )] textField.returnKeyT ...