天天看點

安裝5.7mysql資料庫

[[email protected] 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

[[email protected] 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%]

[[email protected] 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%]

[[email protected] 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 需要

[[email protected] 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%]

[[email protected] 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%]

[[email protected] 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%]

[[email protected] 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

[[email protected] mysql-community]$ sudo mkdir  -p /usr/local/mysql/data

[[email protected] 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

[[email protected] 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.

[[email protected] 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 ===

[[email protected] 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 [email protected]' 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 '@ [email protected]' 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 [email protected]' 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 [email protected]' 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.

[[email protected] mysql-community]$ 

繼續閱讀