安装5.7mysql数据库

[wangshumin@CentOSNode5 mysql-community]$ ll
总用量 579380
-rw-r--r-- 1 wangshumin wangshumin  25090196 7月   1 20:54 mysql-community-client-5.7.20-1.el7.x86_64.rpm
-rw-r--r-- 1 wangshumin wangshumin    278300 7月   1 20:54 mysql-community-common-5.7.20-1.el7.x86_64.rpm
-rw-r--r-- 1 wangshumin wangshumin   3778120 7月   1 20:54 mysql-community-devel-5.7.20-1.el7.x86_64.rpm
-rw-r--r-- 1 wangshumin wangshumin  46238924 7月   1 20:54 mysql-community-embedded-5.7.20-1.el7.x86_64.rpm
-rw-r--r-- 1 wangshumin wangshumin  24077232 7月   1 20:54 mysql-community-embedded-compat-5.7.20-1.el7.x86_64.rpm
-rw-r--r-- 1 wangshumin wangshumin 128440800 7月   1 20:54 mysql-community-embedded-devel-5.7.20-1.el7.x86_64.rpm
-rw-r--r-- 1 wangshumin wangshumin   2238604 7月   1 20:54 mysql-community-libs-5.7.20-1.el7.x86_64.rpm
-rw-r--r-- 1 wangshumin wangshumin   2115892 7月   1 20:54 mysql-community-libs-compat-5.7.20-1.el7.x86_64.rpm
-rw-r--r-- 1 wangshumin wangshumin  55538708 7月   1 20:54 mysql-community-minimal-debuginfo-5.7.20-1.el7.x86_64.rpm
-rw-r--r-- 1 wangshumin wangshumin 171597916 7月   1 20:54 mysql-community-server-5.7.20-1.el7.x86_64.rpm
-rw-r--r-- 1 wangshumin wangshumin  15256460 7月   1 20:54 mysql-community-server-minimal-5.7.20-1.el7.x86_64.rpm
-rw-r--r-- 1 wangshumin wangshumin 118609776 7月   1 20:54 mysql-community-test-5.7.20-1.el7.x86_64.rpm
[wangshumin@CentOSNode5 mysql-community]$ sudo rpm -ivh mysql-community-common-5.7.20-1.el7.x86_64.rpm
[sudo] wangshumin 的密码:
警告:mysql-community-common-5.7.20-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-common-5.7.20-1.e################################# [100%]
[wangshumin@CentOSNode5 mysql-community]$ sudo rpm -ivh mysql-community-libs-5.7.20-1.el7.x86_64.rpm
警告:mysql-community-libs-5.7.20-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-libs-5.7.20-1.el7################################# [100%]
[wangshumin@CentOSNode5 mysql-community]$ sudo rpm -ivh mysql-community-server-5.7.20-1.el7.x86_64.rpm
警告:mysql-community-server-5.7.20-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
错误:依赖检测失败:
mysql-community-client(x86-64) >= 5.7.9 被 mysql-community-server-5.7.20-1.el7.x86_64 需要
[wangshumin@CentOSNode5 mysql-community]$ sudo rpm -ivh mysql-community-client-5.7.20-1.el7.x86_64.rpm
警告:mysql-community-client-5.7.20-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-client-5.7.20-1.e################################# [100%]
[wangshumin@CentOSNode5 mysql-community]$ sudo rpm -ivh mysql-community-server-5.7.20-1.el7.x86_64.rpm
警告:mysql-community-server-5.7.20-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-server-5.7.20-1.e警告:/etc/my.cnf 已建立为 /etc/my.cnf.rpmnew 
################################# [100%]
[wangshumin@CentOSNode5 mysql-community]$ sudo rpm -ivh mysql-community-devel-5.7.20-1.el7.x86_64.rpm
警告:mysql-community-devel-5.7.20-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-devel-5.7.20-1.el################################# [100%]
[wangshumin@CentOSNode5 mysql-community]$ rpm -qa|grep mysql
mysql-community-server-5.7.20-1.el7.x86_64
mysql-community-common-5.7.20-1.el7.x86_64
mysql-community-libs-5.7.20-1.el7.x86_64
mysql-community-client-5.7.20-1.el7.x86_64
mysql-community-devel-5.7.20-1.el7.x86_64
[wangshumin@CentOSNode5 mysql-community]$ sudo mkdir  -p /usr/local/mysql/data
[wangshumin@CentOSNode5 mysql-community]$ systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
[wangshumin@CentOSNode5 mysql-community]$ systemctl start mysqld
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: wangshumin
Password: 
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to start mysqld.service: Access denied
See system logs and 'systemctl status mysqld.service' for details.
[wangshumin@CentOSNode5 mysql-community]$ systemctl restart mysqld.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: wangshumin
Password: 
==== AUTHENTICATION COMPLETE ===
[wangshumin@CentOSNode5 mysql-community]$ systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since 日 2018-07-01 21:01:22 CST; 7s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 1977 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
  Process: 1866 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 1981 (mysqld)
   CGroup: /system.slice/mysqld.service
           └─1981 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid


7月 01 21:01:22 CentOSNode5 mysqld[1977]: 2018-07-01T13:01:22.766997Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
7月 01 21:01:22 CentOSNode5 mysqld[1977]: 2018-07-01T13:01:22.767031Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
7月 01 21:01:22 CentOSNode5 mysqld[1977]: 2018-07-01T13:01:22.768409Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
7月 01 21:01:22 CentOSNode5 mysqld[1977]: 2018-07-01T13:01:22.768424Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
7月 01 21:01:22 CentOSNode5 mysqld[1977]: 2018-07-01T13:01:22.772565Z 0 [Note] Event Scheduler: Loaded 0 events
7月 01 21:01:22 CentOSNode5 mysqld[1977]: 2018-07-01T13:01:22.774389Z 0 [Note]
7月 01 21:01:22 CentOSNode5 mysqld[1977]: 2018-07-01T13:01:22.774400Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the depreca... this check.
7月 01 21:01:22 CentOSNode5 mysqld[1977]: 2018-07-01T13:01:22.774403Z 0 [Note] Beginning of list of non-natively partitioned tables
7月 01 21:01:22 CentOSNode5 mysqld[1977]: 2018-07-01T13:01:22.783738Z 0 [Note] End of list of non-natively partitioned tables
7月 01 21:01:22 CentOSNode5 systemd[1]: Started MySQL Server.
Hint: Some lines were ellipsized, use -l to show in full.
[wangshumin@CentOSNode5 mysql-community]$ 

猜你喜欢

转载自blog.csdn.net/wangshuminjava/article/details/80877488