CentOS 6.9安装MySQL 5.6 (使用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, 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>
至此,MySQL安装完毕~

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

  1. Centos中彻底删除Mysql(rpm、yum安装的情况)

    [root@data lib]# rpm -qa¦grep mysqlmysql-5.5.25-1.el6.remi.i686mysql-libs-5.5.25-1.el6.remi.i686comp ...

  2. 阿里云服务器Linux CentOS安装配置(三)yum安装mysql

    阿里云服务器Linux CentOS安装配置(三)yum安装mysql 1.执行yum安装mysql命令:yum -y install mysql-server mysql-devel 2.启动mys ...

  3. CentOS下成功挂载xxxxxDVDx.iso并使用yum安装软件

    CentOS下成功挂载xxxxxDVDx.iso并使用yum安装软件 **不断尝试,终能到达彼岸** 测试环境为Win7 32位,VirtualBOx4.2.16+CentOS6.5,可分别到virt ...

  4. 阿里云服务器Linux CentOS安装配置(四)yum安装tomcat

    阿里云服务器Linux CentOS安装配置(四)yum安装tomcat 1.yum -y install tomcat  执行命令后,会帮你把jdk也安装好 2.tomcat安装目录:/var/li ...

  5. 阿里云服务器Linux CentOS安装配置(二)yum安装svn

    阿里云服务器Linux CentOS安装配置(二)yum安装svn 1.secureCRT连接服务器 2.先创建一个文件夹,用来按自己的习惯来,用来存放数据 mkdir /data 3.yum安装sv ...

  6. linux安装mysql全纪录[包括yum和rpm安装,编码,远程连接以及大小写问题]

    linux安装mysql全纪录[包括yum和rpm安装,编码,远程连接以及大小写问题] 一.查看mysql是否已经安装 使用“whereis mysql”命令来查看mysql安装路径: [root@h ...

  7. linux安装mysql服务分两种安装方法:

    linux安装mysql服务分两种安装方法: ①源码安装,优点是安装包比较小,只有十多M,缺点是安装依赖的库多,安装编译时间长,安装步骤复杂容易出错: ②使用官方编译好的二进制文件安装,优点是安装速度 ...

  8. Linux安装MySql5.7及配置(yum安装)

    Linux安装MySql5.7及配置(yum安装) [root@xld ~]# rpm -q centos-release centos-release-7-7.1908.0.el7.centos.x ...

  9. [教程]centos卸载、安装mysql(源码编译安装方式)

    -----------1 卸载系统自带的msyql包 rpm -qa|grep mysql rpm -e --nodeps mysql-server-5.1.71-1.el6.x86_64 --强制卸 ...

  10. Centos6.5安装mysql不能启动,应该安装mysql-server

    centos中安装mysql很简单如下命令即可 yum install mysql 装好了, 运行mysql ERROR 2002 (HY000): Can't connect to local My ...

随机推荐

  1. Android 安全攻防(一):SEAndroid的编译

    转自:http://blog.csdn.net/yiyaaixuexi/article/details/8330645 SEAndroid概述   SEAndroid(Security-Enhance ...

  2. 为Dynamics 365 USD设置使用Chrome进程来驻留Web应用程序

    我是微软Dynamics 365 & Power Platform方面的工程师罗勇,也是2015年7月到2018年6月连续三年Dynamics CRM/Business Solutions方面 ...

  3. 【LeetCode】746. 使用最小花费爬楼梯

    使用最小花费爬楼梯 数组的每个索引做为一个阶梯,第 i个阶梯对应着一个非负数的体力花费值 cost[i](索引从0开始). 每当你爬上一个阶梯你都要花费对应的体力花费值,然后你可以选择继续爬一个阶梯或 ...

  4. 获取SpringCloud gateway响应的response的值,记录踩坑

    最近在做网关改造,想要通过Gateway过滤器获取ResponseBody的值,查看了网上的帖子和官网内容: 帖子:https://cloud.tencent.com/developer/articl ...

  5. linux 创建虚拟块设备,制作文件系统并挂载,用于测试lustre

    1.制作块文件 3 个 [root@localhost yaoxu]# [root@localhost yaoxu]# [root@localhost yaoxu]# 2.创建回环设备 [root@l ...

  6. Linux PXE + Kickstart 自动装机

    大规模装机时,使用无人值守装机便可大大简便人工操作,提高效率. PXE 网络安装 配置双网卡 这里ens33为nat网络,ens37为仅主机网络,配置ens37 [root@localhost ~]# ...

  7. JavaScript—数据可视化(ECharts)

    Echarts具有丰富的图表,可以说是数据可视化的神器: 1.下载Echarts 官网下载地址:https://echarts.baidu.com/index.html 2.Echarts引用案例—柱 ...

  8. docker卷管理(四)

    什么是数据卷 overlay2存储卷 docker镜像是由多个只读层叠加而成,启动容器时,docker会加载只读镜像层,并在镜像栈顶部添加一个可写层 如果运行中的容器修改了现有的一个已存在文件,那该文 ...

  9. ntp服务设置开机自启动失败

    设置了ntpd开机自启动,重启服务器ntpd没有自启动 1.需要禁掉chronyd.service: systemctl disable chronyd.service 2.手动启动ntpd: sys ...

  10. [排序][链表]Leetcode147 对链表进行插入排序

    思路: 插入算法的思想很简单,此题比较为链表数据类型,方便的是不用一个一个的向后移动元素,但是找到应该插入的位置相对麻烦,因为链表只有next指针,无法快速定位要插入的位置.在链表前面插入一个空指针, ...