本文记录一次在CentOS上安装MysqL的步骤,采用yum安裝的方式~

移除CentOS默认的MysqL-libs

[root@test01 srv]# whereis MysqL
MysqL: /usr/lib64/MysqL /usr/share/MysqL
[root@test01 srv]#

为了避免冲突,先移除CenttOS上默认的MysqL-libs,使用yum remove MysqL-libs完成,如:

[root@test01 srv]# yum remove MysqL-libs
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package MysqL-libs.x86_64 0:5.1.73-8.el6_8 will be erased
--> Processing Dependency: libMysqLclient.so.16()(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64
--> Processing Dependency: libMysqLclient.so.16(libMysqLclient_16)(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64
--> Processing Dependency: MysqL-libs for package: 2:postfix-2.6.6-8.el6.x86_64
--> Running transaction check
---> Package postfix.x86_64 2:2.6.6-8.el6 will be erased
--> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.4-16.el6_8.2.x86_64
--> Running transaction check
---> Package cronie.x86_64 0:1.4.4-16.el6_8.2 will be erased
--> Processing Dependency: cronie = 1.4.4-16.el6_8.2 for package: cronie-anacron-1.4.4-16.el6_8.2.x86_64
--> Running transaction check
---> Package cronie-anacron.x86_64 0:1.4.4-16.el6_8.2 will be erased
--> Processing Dependency: /etc/cron.d for package: sysstat-9.0.4-33.el6.x86_64
--> Processing Dependency: /etc/cron.d for package: crontabs-1.10-33.el6.noarch
--> 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-33.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                     Arch                                                Version                                                          Repository                                                                             Size
==============================================================================================================================================================================================================================================================================
Removing:
 MysqL-libs                                                  x86_64                                              5.1.73-8.el6_8                                                   @anaconda-CentOS-201703281317.x86_64/6.9                                              4.0 M
Removing for dependencies:
 cronie                                                      x86_64                                              1.4.4-16.el6_8.2                                                 @anaconda-CentOS-201703281317.x86_64/6.9                                              174 k
 cronie-anacron                                              x86_64                                              1.4.4-16.el6_8.2                                                 @anaconda-CentOS-201703281317.x86_64/6.9                                               43 k
 crontabs                                                    noarch                                              1.10-33.el6                                                      @anaconda-CentOS-201703281317.x86_64/6.9                                              2.4 k
 postfix                                                     x86_64                                              2:2.6.6-8.el6                                                    @anaconda-CentOS-201703281317.x86_64/6.9                                              9.7 M
 sysstat                                                     x86_64                                              9.0.4-33.el6                                                     @ISO                                                                                  826 k

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

Installed size: 15 M
Is this ok [y/N]:

输入y

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-33.el6.x86_64                                                                                                                                                                                                                                1/6 
  Erasing    : cronie-1.4.4-16.el6_8.2.x86_64                                                                                                                                                                                                                             2/6 
  Erasing    : cronie-anacron-1.4.4-16.el6_8.2.x86_64                                                                                                                                                                                                                     3/6 
  Erasing    : crontabs-1.10-33.el6.noarch                                                                                                                                                                                                                                4/6 
  Erasing    : 2:postfix-2.6.6-8.el6.x86_64                                                                                                                                                                                                                               5/6 
  Erasing    : MysqL-libs-5.1.73-8.el6_8.x86_64                                                                                                                                                                                                                           6/6 
  Verifying  : cronie-anacron-1.4.4-16.el6_8.2.x86_64                                                                                                                                                                                                                     1/6 
  Verifying  : cronie-1.4.4-16.el6_8.2.x86_64                                                                                                                                                                                                                             2/6 
  Verifying  : 2:postfix-2.6.6-8.el6.x86_64                                                                                                                                                                                                                               3/6 
  Verifying  : crontabs-1.10-33.el6.noarch                                                                                                                                                                                                                                4/6 
  Verifying  : sysstat-9.0.4-33.el6.x86_64                                                                                                                                                                                                                                5/6 
  Verifying  : MysqL-libs-5.1.73-8.el6_8.x86_64                                                                                                                                                                                                                           6/6 

Removed:
  MysqL-libs.x86_64 0:5.1.73-8.el6_8                                                                                                                                                                                                                                          

Dependency Removed:
  cronie.x86_64 0:1.4.4-16.el6_8.2                      cronie-anacron.x86_64 0:1.4.4-16.el6_8.2                      crontabs.noarch 0:1.10-33.el6                      postfix.x86_64 2:2.6.6-8.el6                      sysstat.x86_64 0:9.0.4-33.el6                     

Complete!
[root@test01 srv]#

清空dbcache

然后,使用yum clean dbcache清空db缓存,如

[root@test01 srv]# yum clean dbcache
Loaded plugins: fastestmirror
Cleaning repos: ISO
3 sqlite files removed

下载MysqL rpm安装包

下载MysqL rpm安装包

wget http://repo.MysqL.com/MysqL-community-release-el6-5.noarch.rpm

[root@test01 srv]# wget http://repo.MysqL.com/MysqL-community-release-el6-5.noarch.rpm
--2017-05-08 10:40:29--  http://repo.MysqL.com/MysqL-community-release-el6-5.noarch.rpm
Resolving repo.MysqL.com... 223.119.236.209
Connecting to repo.MysqL.com|223.119.236.209|:80... connected.
HTTP request sent,awaiting response... 200 OK
Length: 5824 (5.7K) [application/x-redhat-package-manager]
Saving to: “MysqL-community-release-el6-5.noarch.rpm”

100%[====================================================================================================================================================================================================================================>] 5,824       --.-K/s   in 0s      

2017-05-08 10:40:29 (298 MB/s) - “MysqL-community-release-el6-5.noarch.rpm” saved [5824/5824]

[root@test01 srv]#

安装下载好的rpm文件

使用rpm -ivh MysqL-community-release-el6-5.noarch.rpm安装下载的rpm文件~

[root@test01 srv]# rpm -ivh MysqL-community-release-el6-5.noarch.rpm
Preparing...                ########################################### [100%]
   1:MysqL-community-release########################################### [100%]
[root@test01 srv]#

yum安装MysqL-community-server

使用yum install MysqL-community-server安装MysqL server。

[root@test01 srv]#  yum install MysqL-community-server
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
mysql-connectors-community                                                                                                                                                                                                                             | 2.5 kB     00:00     
mysql-connectors-community/primary_db                                                                                                                                                                                                                  |  15 kB     00:00     
MysqL-tools-community                                                                                                                                                                                                                                  | 2.5 kB     00:00     
MysqL-tools-community/primary_db                                                                                                                                                                                                                       |  35 kB     00:00     
MysqL56-community                                                                                                                                                                                                                                      | 2.5 kB     00:00     
MysqL56-community/primary_db                                                                                                                                                                                                                           | 183 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package MysqL-community-server.x86_64 0:5.6.36-2.el6 will be installed
--> Processing Dependency: MysqL-community-common(x86-64) = 5.6.36-2.el6 for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: MysqL-community-client(x86-64) >= 5.6.10 for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(warnings) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(strict) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(if) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(Sys::Hostname) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(POSIX) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(Getopt::Long) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(File::Temp) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(File::Spec) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(File::Path) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(File::copy) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(File::Basename) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(Fcntl) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(Data::Dumper) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: perl(DBI) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: libnuma.so.1(libnuma_1.2)(64bit) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: libnuma.so.1(libnuma_1.1)(64bit) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: /usr/bin/perl for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Processing Dependency: libnuma.so.1()(64bit) for package: MysqL-community-server-5.6.36-2.el6.x86_64
--> Running transaction check
---> Package MysqL-community-client.x86_64 0:5.6.36-2.el6 will be installed
--> Processing Dependency: MysqL-community-libs(x86-64) >= 5.6.10 for package: MysqL-community-client-5.6.36-2.el6.x86_64
---> Package MysqL-community-common.x86_64 0:5.6.36-2.el6 will be installed
---> Package numactl.x86_64 0:2.0.9-2.el6 will be installed
---> Package perl.x86_64 4:5.10.1-144.el6 will be installed
--> Processing Dependency: perl-libs = 4:5.10.1-144.el6 for package: 4:perl-5.10.1-144.el6.x86_64
--> Processing Dependency: perl-libs for package: 4:perl-5.10.1-144.el6.x86_64
--> Processing Dependency: perl(version) for package: 4:perl-5.10.1-144.el6.x86_64
--> Processing Dependency: perl(Pod::Simple) for package: 4:perl-5.10.1-144.el6.x86_64
--> Processing Dependency: perl(Module::Pluggable) for package: 4:perl-5.10.1-144.el6.x86_64
--> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.10.1-144.el6.x86_64
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
--> Running transaction check
---> Package MysqL-community-libs.x86_64 0:5.6.36-2.el6 will be installed
---> Package perl-Module-Pluggable.x86_64 1:3.90-144.el6 will be installed
---> Package perl-Pod-Simple.x86_64 1:3.13-144.el6 will be installed
--> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.13-144.el6.x86_64
---> Package perl-libs.x86_64 4:5.10.1-144.el6 will be installed
---> Package perl-version.x86_64 3:0.77-144.el6 will be installed
--> Running transaction check
---> Package perl-Pod-Escapes.x86_64 1:1.04-144.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                                 Arch                                                    Version                                                             Repository                                                          Size
==============================================================================================================================================================================================================================================================================
Installing:
 MysqL-community-server                                                  x86_64                                                  5.6.36-2.el6                                                        MysqL56-community                                                   55 M
Installing for dependencies:
 MysqL-community-client                                                  x86_64                                                  5.6.36-2.el6                                                        MysqL56-community                                                   18 M
 MysqL-community-common                                                  x86_64                                                  5.6.36-2.el6                                                        MysqL56-community                                                  308 k
 MysqL-community-libs                                                    x86_64                                                  5.6.36-2.el6                                                        MysqL56-community                                                  1.9 M
 numactl                                                                 x86_64                                                  2.0.9-2.el6                                                         ISO                                                                 74 k
 perl                                                                    x86_64                                                  4:5.10.1-144.el6                                                    ISO                                                                 10 M
 perl-DBI                                                                x86_64                                                  1.609-4.el6                                                         ISO                                                                705 k
 perl-Module-Pluggable                                                   x86_64                                                  1:3.90-144.el6                                                      ISO                                                                 41 k
 perl-Pod-Escapes                                                        x86_64                                                  1:1.04-144.el6                                                      ISO                                                                 33 k
 perl-Pod-Simple                                                         x86_64                                                  1:3.13-144.el6                                                      ISO                                                                213 k
 perl-libs                                                               x86_64                                                  4:5.10.1-144.el6                                                    ISO                                                                579 k
 perl-version                                                            x86_64                                                  3:0.77-144.el6                                                      ISO                                                                 52 k

Transaction Summary
==============================================================================================================================================================================================================================================================================
Install      12 Package(s)

Total download size: 87 M
Installed size: 373 M
Is this ok [y/N]:

选择y

Is this ok [y/N]: y
Downloading Packages:
(1/12): MysqL-community-client-5.6.36-2.el6.x86_64.rpm                                                                                                                                                                                                 |  18 MB     00:01     
(2/12): MysqL-community-common-5.6.36-2.el6.x86_64.rpm                                                                                                                                                                                                 | 308 kB     00:00     
(3/12): MysqL-community-libs-5.6.36-2.el6.x86_64.rpm                                                                                                                                                                                                   | 1.9 MB     00:00     
(4/12): MysqL-community-server-5.6.36-2.el6.x86_64.rpm                                                                                                                                                                                                 |  55 MB     00:03     
(5/12): numactl-2.0.9-2.el6.x86_64.rpm                                                                                                                                                                                                                 |  74 kB     00:00     
(6/12): perl-5.10.1-144.el6.x86_64.rpm                                                                                                                                                                                                                 |  10 MB     00:00     
(7/12): perl-DBI-1.609-4.el6.x86_64.rpm                                                                                                                                                                                                                | 705 kB     00:00     
(8/12): perl-Module-Pluggable-3.90-144.el6.x86_64.rpm                                                                                                                                                                                                  |  41 kB     00:00     
(9/12): perl-Pod-Escapes-1.04-144.el6.x86_64.rpm                                                                                                                                                                                                       |  33 kB     00:00     
(10/12): perl-Pod-Simple-3.13-144.el6.x86_64.rpm                                                                                                                                                                                                       | 213 kB     00:00     
(11/12): perl-libs-5.10.1-144.el6.x86_64.rpm                                                                                                                                                                                                           | 579 kB     00:00     
(12/12): perl-version-0.77-144.el6.x86_64.rpm                                                                                                                                                                                                          |  52 kB     00:00     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                          14 MB/s |  87 MB     00:06     
warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature,key ID 5072e1f5: NOKEY
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>
 Package: MysqL-community-release-el6-5.noarch (installed)
 From   : file:/etc/pki/rpm-gpg/RPM-GPG-KEY-MysqL
Is this ok [y/N]:

选择y

Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : MysqL-community-common-5.6.36-2.el6.x86_64                                                                                                                                                                                                                1/12 
  Installing : MysqL-community-libs-5.6.36-2.el6.x86_64                                                                                                                                                                                                                  2/12 
  Installing : 1:perl-Pod-Escapes-1.04-144.el6.x86_64                                                                                                                                                                                                                    3/12 
  Installing : 4:perl-libs-5.10.1-144.el6.x86_64                                                                                                                                                                                                                         4/12 
  Installing : 1:perl-Module-Pluggable-3.90-144.el6.x86_64                                                                                                                                                                                                               5/12 
  Installing : 1:perl-Pod-Simple-3.13-144.el6.x86_64                                                                                                                                                                                                                     6/12 
  Installing : 3:perl-version-0.77-144.el6.x86_64                                                                                                                                                                                                                        7/12 
  Installing : 4:perl-5.10.1-144.el6.x86_64                                                                                                                                                                                                                              8/12 
  Installing : perl-DBI-1.609-4.el6.x86_64                                                                                                                                                                                                                               9/12 
  Installing : MysqL-community-client-5.6.36-2.el6.x86_64                                                                                                                                                                                                               10/12 
  Installing : numactl-2.0.9-2.el6.x86_64                                                                                                                                                                                                                               11/12 
  Installing : MysqL-community-server-5.6.36-2.el6.x86_64                                                                                                                                                                                                               12/12 
  Verifying  : 3:perl-version-0.77-144.el6.x86_64                                                                                                                                                                                                                        1/12 
  Verifying  : 4:perl-libs-5.10.1-144.el6.x86_64                                                                                                                                                                                                                         2/12 
  Verifying  : 4:perl-5.10.1-144.el6.x86_64                                                                                                                                                                                                                              3/12 
  Verifying  : numactl-2.0.9-2.el6.x86_64                                                                                                                                                                                                                                4/12 
  Verifying  : MysqL-community-common-5.6.36-2.el6.x86_64                                                                                                                                                                                                                5/12 
  Verifying  : perl-DBI-1.609-4.el6.x86_64                                                                                                                                                                                                                               6/12 
  Verifying  : MysqL-community-server-5.6.36-2.el6.x86_64                                                                                                                                                                                                                7/12 
  Verifying  : MysqL-community-libs-5.6.36-2.el6.x86_64                                                                                                                                                                                                                  8/12 
  Verifying  : MysqL-community-client-5.6.36-2.el6.x86_64                                                                                                                                                                                                                9/12 
  Verifying  : 1:perl-Module-Pluggable-3.90-144.el6.x86_64                                                                                                                                                                                                              10/12 
  Verifying  : 1:perl-Pod-Simple-3.13-144.el6.x86_64                                                                                                                                                                                                                    11/12 
  Verifying  : 1:perl-Pod-Escapes-1.04-144.el6.x86_64                                                                                                                                                                                                                   12/12 

Installed:
  MysqL-community-server.x86_64 0:5.6.36-2.el6                                                                                                                                                                                                                                

Dependency Installed:
  MysqL-community-client.x86_64 0:5.6.36-2.el6       MysqL-community-common.x86_64 0:5.6.36-2.el6       MysqL-community-libs.x86_64 0:5.6.36-2.el6       numactl.x86_64 0:2.0.9-2.el6            perl.x86_64 4:5.10.1-144.el6             perl-DBI.x86_64 0:1.609-4.el6      
  perl-Module-Pluggable.x86_64 1:3.90-144.el6        perl-Pod-Escapes.x86_64 1:1.04-144.el6             perl-Pod-Simple.x86_64 1:3.13-144.el6            perl-libs.x86_64 4:5.10.1-144.el6       perl-version.x86_64 3:0.77-144.el6      

Complete!
[root@test01 srv]#

启动服务

service MysqLd start

[root@test01 srv]# service MysqLd start
Initializing MysqL database:  2017-05-08 11:06:09 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-05-08 11:06:09 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2017-05-08 11:06:09 0 [Note] /usr/sbin/MysqLd (MysqLd 5.6.36) starting as process 926 ...
2017-05-08 11:06:09 926 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-05-08 11:06:09 926 [Note] InnoDB: The InnoDB memory heap is disabled
2017-05-08 11:06:09 926 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-05-08 11:06:09 926 [Note] InnoDB: Memory barrier is not used
2017-05-08 11:06:09 926 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-05-08 11:06:09 926 [Note] InnoDB: Using Linux native AIO
2017-05-08 11:06:09 926 [Note] InnoDB: Not using cpu crc32 instructions
2017-05-08 11:06:09 926 [Note] InnoDB: Initializing buffer pool,size = 128.0M
2017-05-08 11:06:09 926 [Note] InnoDB: Completed initialization of buffer pool
2017-05-08 11:06:09 926 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2017-05-08 11:06:09 926 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2017-05-08 11:06:09 926 [Note] InnoDB: Database physically writes the file full: wait...
2017-05-08 11:06:09 926 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2017-05-08 11:06:09 926 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2017-05-08 11:06:09 926 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2017-05-08 11:06:09 926 [Warning] InnoDB: New log files created,LSN=45781
2017-05-08 11:06:09 926 [Note] InnoDB: Doublewrite buffer not found: creating new
2017-05-08 11:06:09 926 [Note] InnoDB: Doublewrite buffer created
2017-05-08 11:06:09 926 [Note] InnoDB: 128 rollback segment(s) are active.
2017-05-08 11:06:09 926 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-05-08 11:06:09 926 [Note] InnoDB: Foreign key constraint system tables created
2017-05-08 11:06:09 926 [Note] InnoDB: Creating tablespace and datafile system tables.
2017-05-08 11:06:09 926 [Note] InnoDB: Tablespace and datafile system tables created.
2017-05-08 11:06:09 926 [Note] InnoDB: Waiting for purge to start
2017-05-08 11:06:09 926 [Note] InnoDB: 5.6.36 started; log sequence number 0
2017-05-08 11:06:09 926 [Note] binlog end
2017-05-08 11:06:09 926 [Note] InnoDB: FTS optimize thread exiting.
2017-05-08 11:06:09 926 [Note] InnoDB: Starting shutdown...
2017-05-08 11:06:11 926 [Note] InnoDB: Shutdown completed; log sequence number 1625977


2017-05-08 11:06:11 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-05-08 11:06:11 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2017-05-08 11:06:11 0 [Note] /usr/sbin/MysqLd (MysqLd 5.6.36) starting as process 948 ...
2017-05-08 11:06:11 948 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-05-08 11:06:11 948 [Note] InnoDB: The InnoDB memory heap is disabled
2017-05-08 11:06:11 948 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-05-08 11:06:11 948 [Note] InnoDB: Memory barrier is not used
2017-05-08 11:06:11 948 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-05-08 11:06:11 948 [Note] InnoDB: Using Linux native AIO
2017-05-08 11:06:11 948 [Note] InnoDB: Not using cpu crc32 instructions
2017-05-08 11:06:11 948 [Note] InnoDB: Initializing buffer pool,size = 128.0M
2017-05-08 11:06:11 948 [Note] InnoDB: Completed initialization of buffer pool
2017-05-08 11:06:11 948 [Note] InnoDB: Highest supported file format is Barracuda.
2017-05-08 11:06:11 948 [Note] InnoDB: 128 rollback segment(s) are active.
2017-05-08 11:06:11 948 [Note] InnoDB: Waiting for purge to start
2017-05-08 11:06:11 948 [Note] InnoDB: 5.6.36 started; log sequence number 1625977
2017-05-08 11:06:11 948 [Note] binlog end
2017-05-08 11:06:11 948 [Note] InnoDB: FTS optimize thread exiting.
2017-05-08 11:06:11 948 [Note] InnoDB: Starting shutdown...
2017-05-08 11:06:13 948 [Note] InnoDB: Shutdown completed; log sequence number 1625987




PLEASE REMEMBER TO SET A PASSWORD FOR THE MysqL root USER !
To do so,start the server,then issue the following commands:

  /usr/bin/MysqLadmin -u root password 'new-password'
  /usr/bin/MysqLadmin -u root -h test01.znyj.interconnect password 'new-password'

Alternatively you can run:

  /usr/bin/MysqL_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at http://bugs.MysqL.com/

The latest information about MysqL is available on the web at

  http://www.MysqL.com

Support MysqL by buying support/licenses at http://shop.MysqL.com

Note: new default config file not created.
Please make sure your config file is current

WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MysqL server
If you do not want to use this,either remove it,or use the
--defaults-file argument to MysqLd_safe when starting the server

                                                           [  OK  ]
Starting MysqLd:                                           [  OK  ]
[root@test01 srv]#

修改密码

默认密码是空的~使用MysqL -uroot进入~

[root@test01 srv]# MysqL -uroot 
Welcome to the MysqL monitor.  Commands end with ; or \g.
Your MysqL connection id is 2
Server version: 5.6.36 MysqL Community Server (GPL)

copyright (c) 2000,2017,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>

修改密码~

使用update user set password=PASSWORD("YOUR_PASSWORD") where user='root';修改root账号密码~

MysqL> use MysqL;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MysqL> update user set password=PASSWORD("YOUR_PASSWORD") where user='root'
    -> ;
Query OK,4 rows affected (0.00 sec)
Rows matched: 4  Changed: 4  Warnings: 0

MysqL>  flush privileges;
Query OK,0 rows affected (0.00 sec)

MysqL>

密码验证

重新登录MysqL服务,验证修改后的密码~

MysqL> quit
Bye
[root@test01 srv]# MysqL -uroot
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@test01 srv]# MysqL -uroot -p
Enter password: 
Welcome to the MysqL monitor.  Commands end with ; or \g.
Your MysqL connection id is 4
Server version: 5.6.36 MysqL Community Server (GPL)

copyright (c) 2000,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安装完毕~

CentOS 6.9安装MySQL 5.6 使用yum安装的更多相关文章

  1. ios – Xcode找不到Alamofire,错误:没有这样的模块’Alamofire’

    我正在尝试按照github(https://github.com/Alamofire/Alamofire#cocoapods)指令将Alamofire包含在我的Swift项目中.我创建了一个新项目,导航到项目目录并运行此命令sudogeminstallcocoapods.然后我面临以下错误:搜索后我设法通过运行此命令安装cocoapodssudogeminstall-n/usr/local/bin

  2. ios – 1天后firebase crashlytics报告中没有数据

    解决方法对于那些仍然有问题的人.检查您的podfile中是否还有pod’Firebase/Crash’.当我删除旧的Firebase崩溃报告时,我的问题已修复.

  3. ios – 当我在xCode 5中验证我的应用程序时,获取错误的广告标识符[IDFA]错误

    在验证我的应用程序时,我收到错误消息“广告标识符使用不当.您的应用包含广告标识符[IDFA]API,但您尚未遵守iOS中的限制广告跟踪设置.”我在广告标识符的准备上传页面上检查了“是”.我在我的应用程序中使用revmob广告和flurry分析(COCOS2D-X项目).如何解决这个问题,我已经尝试了很多但没有成功.我使用下面的代码进入appdelegate但没有运气.解决方法这个IDFA问题今天仍

  4. 将POD规范属性与其Xcode配置中的不同构建设置相关联(例如,发布,调试)

    我正在尝试为现有的库项目创建POD规范.在Xcode项目中,构建设置为不同的构建配置定义了不同的预处理器宏例如:对于“调试”配置:对于“发布”配置:如何将这些设置映射到相应的POD规范?

  5. 你如何将xcode项目转换为cocoapod?

    我有一段代码,我发现我在多个不同的项目中重复使用,所以我想把它变成一个cocoapod并使用私人cocoapod仓库.我的问题是如何将xcode项目设置为cocoapod?它应该是一个静态库还是一个带有appdelegate的空“项目”?

  6. ios – 故事板UICollectionViewCell显示,然后变为空白

    问题:我在Storyboard/InterfaceBuilder上使用UIViewController,其中有一个UICollectionView,用于定义UICollectionViewCell.每当我在这个单元格中更改某些内容时,其所有子视图都会变为空白,从而无法看到任何内容.此外,当我更新约束时,即使我刷新,框架也不会移动,就像整个界面构建器被破坏一样.它只适用于这个UIViewContro

  7. ios – Xcode 7.3 – 警告未显示且无法搜索项目

    自从我升级到Xcode7.3后,我注意到在搜索我的工作区时总是得到“无结果”,并且警告窗格中也没有出现任何警告.偶尔它会工作几分钟而且会再次死亡.重新启动我的电脑,Xcode,并重新安装没有帮助.是否有其他人遇到此问题或找到解决方案/解决方法?

  8. ios – 与项目中包含的自定义框架共享cocoapods

    对于以下架构:_码___CustomFramework___ProjectA_____ProjectA_____Workspace_____Podfile_____Pods我正在使用ProjectA的工作区(由podfile生成),我在ProjectA中成功包含了CustomFramework,我可以使用ProjectA中的CustomFramework方法.现在,我想与CustomFramewo

  9. 通用iOS应用程序在TestFlight中的iPad Air 2上不兼容

    您应该为项目和目标设置“有效架构”:armv7,armv7s和arm64.

  10. ios – 如何在不创建新目标的情况下阻止`pod install`将libPods.a添加到“Link with Libraries”构建阶段?

    解决方法要防止集成,您可以使用:

随机推荐

  1. 在airgapped(离线)CentOS 6系统上安装yum软件包

    我有一个CentOS6系统,出于安全考虑,它已经被空气泄漏.它可能从未连接到互联网,如果有,它很长时间没有更新.我想将所有.rpm软件包放在一个驱动器上,这样它们就可以脱机安装而无需查询互联网.但是,我在测试VM上遇到的问题是,即使指定了本地路径,yum仍然会挂起并尝试从在线存储库进行更新.另外,有没有办法使用yum-utils/yumdownloader轻松获取该包的所有依赖项和所有依赖项?目前

  2. centos – 命名在日志旋转后停止记录到rsyslog

    CentOS6.2,绑定9.7.3,rsyslog4.6.2我最近设置了一个服务器,我注意到在日志轮换后,named已停止记录到/var/log/messages.我认为这很奇怪,因为所有日志记录都是通过rsyslog进行的,并且named不会直接写入日志文件.这更奇怪,因为我在更新区域文件后命名了HUPed,但它仍然没有记录.在我停止并重新启动命名后,记录恢复.这里发生了什么?

  3. centos – 显示错误的磁盘大小

    对于其中一个磁盘,Df-h在我的服务器上显示错误的空白区域:Cpanel表明它只有34GB免费,但还有更多.几分钟前,我删除了超过80GB的日志文件.所以,我确信它完全错了.fdisk-l/dev/sda2也显示错误:如果没有格式化,我该怎么做才能解决这个问题?并且打开文件描述符就是它需要使用才能做到这一点.所以…使用“lsof”并查找已删除的文件.重新启动写入日志文件的服务,你很可能会看到空间可用.

  4. 如何在centos 6.9上安装docker-ce 17?

    我目前正在尝试在centOS6.9服务器上安装docker-ce17,但是,当运行yuminstalldocker-ce时,我收到以下错误:如果我用跳过的标志运行它我仍然得到相同的消息,有没有人知道这方面的方法?

  5. centos – 闲置工作站的异常负载平均值

    我有一个新的工作站,具有不寻常的高负载平均值.机器规格是:>至强cpu>256GB的RAM>4x512GBSSD连接到LSI2108RAID控制器我从livecd安装了CentOS6.564位,配置了分区,网络,用户/组,并安装了一些软件,如开发工具和MATLAB.在启动几分钟后,工作站负载平均值的值介于0.5到0.9之间.但它没有做任何事情.因此我无法理解为什么负载平均值如此之高.你能帮我诊断一下这个问题吗?

  6. centos – Cryptsetup luks – 检查内核是否支持aes-xts-plain64密码

    我在CentOS5上使用cryptsetupluks加密加密了一堆硬盘.一切都很好,直到我将系统升级到CentOS6.现在我再也无法安装磁盘了.使用我的关键短语装载:我收到此错误:在/var/log/messages中:有关如何装载的任何想法?找到解决方案问题是驱动器使用大约512个字符长的交互式关键短语加密.出于某种原因,CentOS6中的新内核模块在由旧版本创建时无法正确读取512个字符的加密密钥.似乎只会影响内核或cryptsetup的不同版本,因为在同一系统上创建和打开时,512字符的密钥将起作用

  7. centos – 大量ssh登录尝试

    22个我今天登录CentOS盒找到以下内容这是过去3天内的11次登录尝试.WTF?请注意,这是我从我的提供商处获得的全新IP,该盒子是全新的.我还没有发布任何关于此框的内容.为什么我会进行如此大量的登录尝试?是某种IP/端口扫描?基本上有4名匪徒,其中2名来自中国,1名来自香港,1名来自Verizon.这只发生在SSH上.HTTP上没有问题.我应该将罪魁祸首子网路由吗?你们有什么建议?

  8. centos – kswap使用100%的CPU,即使有100GB的RAM也可用

    >Linux内核是否应该足够智能,只需从内存中清除旧缓存页而不是启动kswap?

  9. centos – Azure将VM从A2 / 3调整为DS2 v2

    我正在尝试调整前一段时间创建的几个AzureVM,从基本的A3和标准A3到标准的DS2v2.我似乎没有能力调整到这个大小的VM.必须从头开始重建服务器会有点痛苦.如果它有所不同我在VM中运行CentOS,每个都有一个带有应用程序和操作系统的磁盘.任何人都可以告诉我是否可以在不删除磁盘的情况下删除VM,创建新VM然后将磁盘附加到新VM?

  10. centos – 广泛使用RAM时服务器计算速度减慢

    我在非常具体的情况下遇到服务器速度下降的问题.事实是:>1)我使用计算应用WRF>2)我使用双XeonE5-2620v3和128GBRAM(NUMA架构–可能与问题有关!

返回
顶部