【mysql學習】linux安裝mysql

1、rpm bundel包下載到 /usr/local/src中:

[root@localhost src]# lsmysql-5.7.11-1.el6.x86_64.rpm-bundle.tar

2解壓縮bundle包

[root@localhost src]# tar xf mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar 
[root@localhost src]# ls
mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar
mysql-community-client-5.7.11-1.el6.x86_64.rpm
mysql-community-common-5.7.11-1.el6.x86_64.rpm
mysql-community-devel-5.7.11-1.el6.x86_64.rpm
mysql-community-embedded-5.7.11-1.el6.x86_64.rpm
mysql-community-embedded-devel-5.7.11-1.el6.x86_64.rpm
mysql-community-libs-5.7.11-1.el6.x86_64.rpm
mysql-community-libs-compat-5.7.11-1.el6.x86_64.rpm
mysql-community-server-5.7.11-1.el6.x86_64.rpm
mysql-community-test-5.7.11-1.el6.x86_64.rpm

3.安裝mysql-community-server之前,必須安裝mysql-community-client和mysql-community-common  rpm包。而安裝community-client和community-common包之前,必須刪除mysql-lib(系統自帶的版本過低)

[root@localhost src]# rpm -qa | grep mysql
mysql-libs-5.1.73-3.el6_5.x86_64

[root@localhost src]# yum remove mysql-libs
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid 19475.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  39 M RSS (569 MB VSZ)


Dependencies Resolved

===========================================================================================
 Package                              Arch                         version                                Repositor
===================================================================================================================
Removing:
 mysql-libs                           x86_64                       5.1.73-3.el6_5                         @anaconda
Removing for dependencies:
 cronie                               x86_64                       1.4.4-12.el6                           @anaconda
 cronie-anacron                       x86_64                       1.4.4-12.el6                           @anaconda
 crontabs                             noarch                       1.10-33.el6                            @anaconda
 postfix                              x86_64                       2:2.6.6-6.el6_5                        @anaconda
 sysstat                              x86_64                       9.0.4-27.el6                           @anaconda

Transaction Summary
===================================================================================================================
Remove        6 Package(s)

Installed size: 15 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : sysstat-9.0.4-27.el6.x86_64                                                                         
  Erasing    : cronie-1.4.4-12.el6.x86_64                                                                          
  Erasing    : cronie-anacron-1.4.4-12.el6.x86_64                                                                  
  Erasing    : crontabs-1.10-33.el6.noarch                                                                         
  Erasing    : 2:postfix-2.6.6-6.el6_5.x86_64                                                                      
  Erasing    : mysql-libs-5.1.73-3.el6_5.x86_64                                                                    
  Verifying  : cronie-anacron-1.4.4-12.el6.x86_64                                                                  
  Verifying  : mysql-libs-5.1.73-3.el6_5.x86_64                                                                    
  Verifying  : sysstat-9.0.4-27.el6.x86_64                                                                         
  Verifying  : crontabs-1.10-33.el6.noarch                                                                         
  Verifying  : cronie-1.4.4-12.el6.x86_64                                                                          
  Verifying  : 2:postfix-2.6.6-6.el6_5.x86_64                                                                      

Removed:
  mysql-libs.x86_64 0:5.1.73-3.el6_5                                                                               

Dependency Removed:
  cronie.x86_64 0:1.4.4-12.el6    cronie-anacron.x86_64 0:1.4.4-12.el6    crontabs.noarch 0:1.10-33.el6    postfix.

Complete!

4.上面卸載了mysql-lib舊的包,現在安裝mysql-lib最新版的文件,這個包在rpm-bundle裏面都有,

直接安裝即可

[root@localhost src]# rpm -ivh mysql-community-common-5.7.11-1.el6.x86_64.rpm 
warning: mysql-community-common-5.7.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:mysql-community-common ########################################### [100%]
[root@localhost src]# ls
mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar        mysql-community-embedded-5.7.11-1.el6.x86_64.rpm        mysql-commu
mysql-community-client-5.7.11-1.el6.x86_64.rpm  mysql-community-embedded-devel-5.7.11-1.el6.x86_64.rpm  mysql-commu
mysql-community-common-5.7.11-1.el6.x86_64.rpm  mysql-community-libs-5.7.11-1.el6.x86_64.rpm
mysql-community-devel-5.7.11-1.el6.x86_64.rpm   mysql-community-libs-compat-5.7.11-1.el6.x86_64.rpm
[root@localhost src]# rpm -ivh mysql-community-libs-5.7.11-1.el6.x86_64.rpm 
warning: mysql-community-libs-5.7.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:mysql-community-libs   ########################################### [100%]
[root@localhost src]# rpm -ivh mysql-community-client-5.7.11-1.el6.x86_64.rpm 
warning: mysql-community-client-5.7.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:mysql-community-client ########################################### [100%]
[root@localhost src]# rpm -ivh mysql-community-server-5.7.11-1.el6.x86_64.rpm 
warning: mysql-community-server-5.7.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:mysql-community-server ########################################### [100%]

5.啓動mysql 服務

[root@localhost src]# service mysql start
mysql: unrecognized service
[root@localhost src]# service mysqld start
Initializing MySQL database:                               [  OK  ]
Installing validate password plugin:                       [  OK  ]
Starting mysqld:                                           [  OK  ]
[root@localhost src]# netstat -tlunp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1525/sshd           
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1384/cupsd          
tcp        0      0 :::22                       :::*                        LISTEN      1525/sshd           
tcp        0      0 ::1:631                     :::*                        LISTEN      1384/cupsd          
tcp        0      0 :::3306                     :::*                        LISTEN      19928/mysqld        
udp        0      0 0.0.0.0:68                  0.0.0.0:*                               19346/dhclient      
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               1384/cupsd

6.rpm安裝mysql後,會自動初始化一個密碼,在日誌中

[root@localhost src]# cat /var/log/mysqld.log | more
2016-03-11T01:44:19.913630Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --ex
plicit_defaults_for_timestamp server option (see documentation for more details).
2016-03-11T01:44:22.271099Z 0 [Warning] InnoDB: New log files created, LSN=45790
2016-03-11T01:44:22.584299Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-03-11T01:44:23.050146Z 0 [Warning] No existing UUID has been found, so we assume that this is the first
 time that this server has been started. Generating a new UUID: c7bf1a6a-e72a-11e5-8737-000c29a05942.
2016-03-11T01:44:23.062259Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cann
ot be opened.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

2016-03-11T01:44:23.093873Z 1 [Note] A temporary password is generated for root@localhost: 8%<rjn;+,11Y

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2016-03-11T01:44:28.470492Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --ex
plicit_defaults_for_timestamp server option (see documentation for more details).
2016-03-11T01:44:28.471726Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.11) starting as process 19672 ...
2016-03-11T01:44:28.626135Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-03-11T01:44:28.626205Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-03-11T01:44:28.626220Z 0 [Note] InnoDB: Uses event mutexes
2016-03-11T01:44:28.626233Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier

7.修改 mysql root密碼,由於最新的mysql版本對密碼策略有要求,所以必須增加複雜程度才能通過

注意,用剛纔的隨機密碼登陸mysql.

[root@localhost src]# mysql -uroot -p
Enter password: 此處輸入剛纔日誌文件中的隨機密碼
Welcome to the MySQL monitor.  commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.7.11

Copyright (c) 2000, 2016, 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> set password='[email protected]';
Query OK, 0 rows affected (0.15 sec)

mysql> quit;
Bye

[root@localhost src]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.7.11 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, 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只允許locathost本地登陸,用mysql workbentch 是無法遠程登陸的。

root@localhost,代表root只允許本地用戶登陸,

所以必須允許root 從任何IP地址登陸。

mysql> grant all privileges on *.* to 'root'@'%' identified by '[email protected]';


###############################################################################

###############################################################################

實操記錄:
[root@localhost tmp]# cd /usr/local/src
[root@localhost src]# ll
total 429204
-rwxrw-rw-. 1 wdl wdl 439500800 Apr  6 20:05 mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar
[root@localhost src]# tar xf mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar
[root@localhost src]# ll
total 858408
-rwxrw-rw-. 1 wdl  wdl   439500800 Apr  6 20:05 mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar
-rw-r--r--. 1 7155 wheel  24176228 Feb  2 01:31 mysql-community-client-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel    333480 Feb  2 01:31 mysql-community-common-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel   3854020 Feb  2 01:31 mysql-community-devel-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel  38247128 Feb  2 01:31 mysql-community-embedded-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel 130605584 Feb  2 01:32 mysql-community-embedded-devel-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel   2237704 Feb  2 01:32 mysql-community-libs-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel   1722544 Feb  2 01:32 mysql-community-libs-compat-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel 141256272 Feb  2 01:33 mysql-community-server-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel  97051252 Feb  2 01:34 mysql-community-test-5.7.11-1.el6.x86_64.rpm
[root@localhost src]# rpm -qa | grep mysql
mysql-libs-5.1.71-1.el6.x86_64
[root@localhost src]# 
[root@localhost src]# 
[root@localhost src]# yum remove mysql-libs
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.1.71-1.el6 will be erased
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
--> Processing Dependency: mysql-libs for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
--> Running transaction check
---> Package postfix.x86_64 2:2.6.6-2.2.el6_1 will be erased
--> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.4-12.el6.x86_64
--> Running transaction check
---> Package cronie.x86_64 0:1.4.4-12.el6 will be erased
--> Processing Dependency: cronie = 1.4.4-12.el6 for package: cronie-anacron-1.4.4-12.el6.x86_64
--> Running transaction check
---> Package cronie-anacron.x86_64 0:1.4.4-12.el6 will be erased
--> Processing Dependency: /etc/cron.d for package: crontabs-1.10-33.el6.noarch
--> Processing Dependency: /etc/cron.d for package: sysstat-9.0.4-22.el6.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package crontabs.noarch 0:1.10-33.el6 will be erased
---> Package sysstat.x86_64 0:9.0.4-22.el6 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================
 Package                     Arch                Version                          Repository                                                            Size
=============================================================================================================================================================
Removing:
 mysql-libs                  x86_64              5.1.71-1.el6                     @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5              4.0 M
Removing for dependencies:
 cronie                      x86_64              1.4.4-12.el6                     @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5              174 k
 cronie-anacron              x86_64              1.4.4-12.el6                     @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5               43 k
 crontabs                    noarch              1.10-33.el6                      @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5              2.4 k
 postfix                     x86_64              2:2.6.6-2.2.el6_1                @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5              9.7 M
 sysstat                     x86_64              9.0.4-22.el6                     @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5              824 k
Transaction Summary
=============================================================================================================================================================
Remove        6 Package(s)
Installed size: 15 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : sysstat-9.0.4-22.el6.x86_64                                                                                                               1/6 
  Erasing    : cronie-1.4.4-12.el6.x86_64                                                                                                                2/6 
  Erasing    : cronie-anacron-1.4.4-12.el6.x86_64                                                                                                        3/6 
  Erasing    : crontabs-1.10-33.el6.noarch                                                                                                               4/6 
  Erasing    : 2:postfix-2.6.6-2.2.el6_1.x86_64                                                                                                          5/6 
  Erasing    : mysql-libs-5.1.71-1.el6.x86_64                                                                                                            6/6 
  Verifying  : cronie-anacron-1.4.4-12.el6.x86_64                                                                                                        1/6 
  Verifying  : 2:postfix-2.6.6-2.2.el6_1.x86_64                                                                                                          2/6 
  Verifying  : mysql-libs-5.1.71-1.el6.x86_64                                                                                                            3/6 
  Verifying  : crontabs-1.10-33.el6.noarch                                                                                                               4/6 
  Verifying  : sysstat-9.0.4-22.el6.x86_64                                                                                                               5/6 
  Verifying  : cronie-1.4.4-12.el6.x86_64                                                                                                                6/6 
Removed:
  mysql-libs.x86_64 0:5.1.71-1.el6                                                                                                                           
Dependency Removed:
  cronie.x86_64 0:1.4.4-12.el6        cronie-anacron.x86_64 0:1.4.4-12.el6       crontabs.noarch 0:1.10-33.el6       postfix.x86_64 2:2.6.6-2.2.el6_1      
  sysstat.x86_64 0:9.0.4-22.el6      
Complete!
[root@localhost src]# ll
total 858408
-rwxrw-rw-. 1 wdl  wdl   439500800 Apr  6 20:05 mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar
-rw-r--r--. 1 7155 wheel  24176228 Feb  2 01:31 mysql-community-client-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel    333480 Feb  2 01:31 mysql-community-common-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel   3854020 Feb  2 01:31 mysql-community-devel-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel  38247128 Feb  2 01:31 mysql-community-embedded-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel 130605584 Feb  2 01:32 mysql-community-embedded-devel-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel   2237704 Feb  2 01:32 mysql-community-libs-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel   1722544 Feb  2 01:32 mysql-community-libs-compat-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel 141256272 Feb  2 01:33 mysql-community-server-5.7.11-1.el6.x86_64.rpm
-rw-r--r--. 1 7155 wheel  97051252 Feb  2 01:34 mysql-community-test-5.7.11-1.el6.x86_64.rpm
[root@localhost src]# rpm -ivh mysql-community-common-5.7.11-1.el6.x86_64.rpm
warning: mysql-community-common-5.7.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:mysql-community-common ########################################### [100%]
[root@localhost src]# 
[root@localhost src]# rpm -ivh mysql-community-libs-5.7.11-1.el6.x86_64.rpm 
warning: mysql-community-libs-5.7.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:mysql-community-libs   ########################################### [100%]
[root@localhost src]# rpm -ivh mysql-community-client-5.7.11-1.el6.x86_64.rpm
warning: mysql-community-client-5.7.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:mysql-community-client ########################################### [100%]
[root@localhost src]# 
[root@localhost src]# rpm -ivh mysql-community-server-5.7.11-1.el6.x86_64.rpm 
warning: mysql-community-server-5.7.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:mysql-community-server ########################################### [100%]
[root@localhost src]# 
[root@localhost src]# 
[root@localhost src]# service mysql start
mysql: unrecognized service
[root@localhost src]# service mysqld start
Initializing MySQL database:                               [  OK  ]
Installing validate password plugin:                       [  OK  ]
Starting mysqld:                                           [  OK  ]
[root@localhost src]# 
[root@localhost src]# 
[root@localhost src]# netstat -tlunp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1826/sshd           
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1716/cupsd          
tcp        0      0 :::22                       :::*                        LISTEN      1826/sshd           
tcp        0      0 ::1:631                     :::*                        LISTEN      1716/cupsd          
tcp        0      0 :::3306                     :::*                        LISTEN      3451/mysqld         
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               1716/cupsd          
[root@localhost src]# 
[root@localhost src]# 
[root@localhost src]# cat /var/log/mysqld.log | more
2016-04-07T03:13:03.129452Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see 
documentation for more details).
2016-04-07T03:13:03.709996Z 0 [Warning] InnoDB: New log files created, LSN=45790
2016-04-07T03:13:03.924838Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-04-07T03:13:04.048200Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generati
ng a new UUID: a4763859-fc6e-11e5-a4fc-510e5376564d.
2016-04-07T03:13:04.052031Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2016-04-07T03:13:04.057163Z 1 [Note] A temporary password is generated for root@localhost: IKIw)u*qX5A8
2016-04-07T03:13:08.935473Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see 
documentation for more details).
2016-04-07T03:13:08.937404Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.11) starting as process 3190 ...
2016-04-07T03:13:08.964847Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-04-07T03:13:08.964908Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-04-07T03:13:08.964920Z 0 [Note] InnoDB: Uses event mutexes
2016-04-07T03:13:08.964931Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2016-04-07T03:13:08.964940Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-04-07T03:13:08.964950Z 0 [Note] InnoDB: Using Linux native AIO
2016-04-07T03:13:08.965500Z 0 [Note] InnoDB: Number of pools: 1
2016-04-07T03:13:08.965736Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2016-04-07T03:13:08.989066Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-04-07T03:13:09.018058Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-04-07T03:13:09.023580Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of set
priority().
2016-04-07T03:13:09.039564Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2016-04-07T03:13:09.105655Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2016-04-07T03:13:09.105983Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2016-04-07T03:13:09.147257Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2016-04-07T03:13:09.149058Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2016-04-07T03:13:09.149157Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2016-04-07T03:13:09.150437Z 0 [Note] InnoDB: Waiting for purge to start
2016-04-07T03:13:09.201463Z 0 [Note] InnoDB: 5.7.11 started; log sequence number 2492554
2016-04-07T03:13:09.202888Z 0 [Note] Plugin 'FEDERATED' is disabled.
2016-04-07T03:13:09.205368Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2016-04-07T03:13:09.209724Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and pr
ivate key
2016-04-07T03:13:09.210064Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2016-04-07T03:13:09.210771Z 0 [Note] IPv6 is available.
2016-04-07T03:13:09.210811Z 0 [Note]   - '::' resolves to '::';
[root@localhost src]# 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.11
Copyright (c) 2000, 2016, 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> 
mysql> 
mysql> set password='Wdln0911'
    -> ^C
mysql> set password='Wdln0911';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> 
mysql> 
mysql> set password='[email protected]';
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
[root@localhost src]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.11 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, 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> 
mysql> 
mysql> 
mysql> grant all privileges on *.* to 'root'@'%' identified by '[email protected]';
Query OK, 0 rows affected, 1 warning (0.09 sec)
mysql> quit
Bye
[root@localhost src]# 
[root@localhost src]# 
[root@localhost src]#


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章