`
hongtoushizi
  • 浏览: 376980 次
  • 性别: Icon_minigender_1
  • 来自: 天津
社区版块
存档分类
最新评论

centos6.5使用yum安装mysql5.6实现不同磁盘的表分区

阅读更多

转载自: http://www.tuicool.com/articles/MVVZfe

很快,很直接  ~   最近在折腾线上的mysql的表分区分表,但是貌似5.5之前的版本不支持分区磁盘的制定,据朋友说 5.6 才支持。   好吧,速度yum一个mysql5.6 试试。 

需要先导入一个repo的包。 

 

 

yum install http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

 

yum install http : //dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

下面是再具体的步骤,很简单。。。。

 

 

[root@vm55 ~]# yum install mysql mysql-devel mysql-server mysql-utilities
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                                              | 5.7 kB     00:00
 * base: mirrors.btte.net
 * epel: ftp.sjtu.edu.cn
 * extras: mirrors.btte.net
 * updates: mirrors.btte.net
epel                                                                                                                                                       | 4.4 kB     00:00
epel/primary_db                                                                                                                                            | 6.3 MB     00:03
mysql-connectors-community                                                                                                                                 | 2.5 kB     00:00
mysql-connectors-community/primary_db                                                                                                                      | 6.8 kB     00:00
mysql-tools-community                                                                                                                                      | 2.5 kB     00:00
mysql-tools-community/primary_db                                                                                                                           |  14 kB     00:00
mysql56-community                                                                                                                                          | 2.5 kB     00:00
mysql56-community/primary_db                                                                                                                               |  49 kB     00:00
Setting up Install Process
Package mysql is obsoleted by mysql-community-client, trying to install mysql-community-client-5.6.20-4.el6.x86_64 instead
Package mysql-devel is obsoleted by mysql-community-devel, trying to install mysql-community-devel-5.6.20-4.el6.x86_64 instead
Package mysql-server is obsoleted by mysql-community-server, trying to install mysql-community-server-5.6.20-4.el6.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.6.20-4.el6 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) = 5.6.20-4.el6 for package: mysql-community-client-5.6.20-4.el6.x86_64
---> Package mysql-community-devel.x86_64 0:5.6.20-4.el6 will be installed
---> Package mysql-community-server.x86_64 0:5.6.20-4.el6 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 5.6.20-4.el6 for package: mysql-community-server-5.6.20-4.el6.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-community-server-5.6.20-4.el6.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-community-server-5.6.20-4.el6.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-community-server-5.6.20-4.el6.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: mysql-community-server-5.6.20-4.el6.x86_64
---> Package mysql-utilities.noarch 0:1.4.4-1.el6 will be installed
--> Processing Dependency: mysql-connector-python >= 1.2.1 for package: mysql-utilities-1.4.4-1.el6.noarch
--> Running transaction check
---> Package libaio.x86_64 0:0.3.107-10.el6 will be installed
---> Package mysql-community-common.x86_64 0:5.6.20-4.el6 will be installed
---> Package mysql-community-libs.x86_64 0:5.6.20-4.el6 will be obsoleting
---> Package mysql-connector-python.noarch 0:1.2.3-1.el6 will be installed
---> Package mysql-libs.x86_64 0:5.1.71-1.el6 will be obsoleted
--> 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
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
--> Running transaction check
---> Package mysql-community-libs-compat.x86_64 0:5.6.20-4.el6 will be obsoleting
---> Package postfix.x86_64 2:2.6.6-2.2.el6_1 will be updated
---> Package postfix.x86_64 2:2.6.6-6.el6_5 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================
 Package                                            Arch                          Version                                 Repository                                         Size
==================================================================================================================================================================================
Installing:
 mysql-community-client                             x86_64                        5.6.20-4.el6                            mysql56-community                                  18 M
 mysql-community-devel                              x86_64                        5.6.20-4.el6                            mysql56-community                                 3.2 M
 mysql-community-libs                               x86_64                        5.6.20-4.el6                            mysql56-community                                 1.9 M
     replacing  mysql-libs.x86_64 5.1.71-1.el6
 mysql-community-libs-compat                        x86_64                        5.6.20-4.el6                            mysql56-community                                 1.6 M
     replacing  mysql-libs.x86_64 5.1.71-1.el6
 mysql-community-server                             x86_64                        5.6.20-4.el6                            mysql56-community                                  52 M
 mysql-utilities                                    noarch                        1.4.4-1.el6                             mysql-tools-community                             952 k
Installing for dependencies:
 libaio                                             x86_64                        0.3.107-10.el6                          base                                               21 k
 mysql-community-common                             x86_64                        5.6.20-4.el6                            mysql56-community                                 299 k
 mysql-connector-python                             noarch                        1.2.3-1.el6                             mysql-connectors-community                        191 k
 perl-DBI                                           x86_64                        1.609-4.el6                             base                                              705 k
Updating for dependencies:
 postfix                                            x86_64                        2:2.6.6-6.el6_5                         updates                                           2.0 M

Transaction Summary
==================================================================================================================================================================================
Install      10 Package(s)
Upgrade       1 Package(s)

Total download size: 81 M
Is this ok [y/N]: y
Downloading Packages:
(1/11): libaio-0.3.107-10.el6.x86_64.rpm                                                                                                                   |  21 kB     00:00
(2/11): mysql-community-client-5.6.20-4.el6.x86_64.rpm                                                                                                     |  18 MB     00:49
(3/11): mysql-community-common-5.6.20-4.el6.x86_64.rpm                                                                                                     | 299 kB     00:00
(4/11): mysql-community-devel-5.6.20-4.el6.x86_64.rpm                                                                                                      | 3.2 MB     00:11
(5/11): mysql-community-libs-5.6.20-4.el6.x86_64.rpm                                                                                                       | 1.9 MB     00:05
(6/11): mysql-community-libs-compat-5.6.20-4.el6.x86_64.rpm                                                                                                | 1.6 MB     00:07
(7/11): mysql-community-server-5.6.20-4.el6.x86_64.rpm                  (57%) 41% [=========================                                    ] 328 kB/s |  22 MB     01:35 ETA
(7/11): mysql-community-server-5.6.20-4.el6.x86_64.rpm                                                                                                     |  52 MB     02:53
(8/11): mysql-connector-python-1.2.3-1.el6.noarch.rpm                                                                                                      | 191 kB     00:00
(9/11): mysql-utilities-1.4.4-1.el6.noarch.rpm                                                                                                             | 952 kB     00:03
(10/11): perl-DBI-1.609-4.el6.x86_64.rpm                                                                                                                   | 705 kB     00:00
(11/11): postfix-2.6.6-6.el6_5.x86_64.rpm                                                                                                                  | 2.0 MB     00:01
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                             324 kB/s |  81 MB     04:14
warning: rpmts_HdrFromFdno: 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 (@/mysql-community-release-el6-5.noarch)
 From   : file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Is this ok [y/N]:

Didn't install any keys
[root@vm55 ~]#
[root@vm55 ~]#
[root@vm55 ~]# yum install mysql mysql-devel mysql-server mysql-utilities
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * epel: ftp.sjtu.edu.cn
 * extras: mirrors.btte.net
 * updates: mirrors.btte.net
Setting up Install Process
Package mysql is obsoleted by mysql-community-client, trying to install mysql-community-client-5.6.20-4.el6.x86_64 instead
Package mysql-devel is obsoleted by mysql-community-devel, trying to install mysql-community-devel-5.6.20-4.el6.x86_64 instead
Package mysql-server is obsoleted by mysql-community-server, trying to install mysql-community-server-5.6.20-4.el6.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.6.20-4.el6 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) = 5.6.20-4.el6 for package: mysql-community-client-5.6.20-4.el6.x86_64
---> Package mysql-community-devel.x86_64 0:5.6.20-4.el6 will be installed
---> Package mysql-community-server.x86_64 0:5.6.20-4.el6 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 5.6.20-4.el6 for package: mysql-community-server-5.6.20-4.el6.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-community-server-5.6.20-4.el6.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-community-server-5.6.20-4.el6.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-community-server-5.6.20-4.el6.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: mysql-community-server-5.6.20-4.el6.x86_64
---> Package mysql-utilities.noarch 0:1.4.4-1.el6 will be installed
--> Processing Dependency: mysql-connector-python >= 1.2.1 for package: mysql-utilities-1.4.4-1.el6.noarch
--> Running transaction check
---> Package libaio.x86_64 0:0.3.107-10.el6 will be installed
---> Package mysql-community-common.x86_64 0:5.6.20-4.el6 will be installed
---> Package mysql-community-libs.x86_64 0:5.6.20-4.el6 will be obsoleting
---> Package mysql-connector-python.noarch 0:1.2.3-1.el6 will be installed
---> Package mysql-libs.x86_64 0:5.1.71-1.el6 will be obsoleted
--> 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
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
--> Running transaction check
---> Package mysql-community-libs-compat.x86_64 0:5.6.20-4.el6 will be obsoleting
---> Package postfix.x86_64 2:2.6.6-2.2.el6_1 will be updated
---> Package postfix.x86_64 2:2.6.6-6.el6_5 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================
 Package                                            Arch                          Version                                 Repository                                         Size
==================================================================================================================================================================================
Installing:
 mysql-community-client                             x86_64                        5.6.20-4.el6                            mysql56-community                                  18 M
 mysql-community-devel                              x86_64                        5.6.20-4.el6                            mysql56-community                                 3.2 M
 mysql-community-libs                               x86_64                        5.6.20-4.el6                            mysql56-community                                 1.9 M
     replacing  mysql-libs.x86_64 5.1.71-1.el6
 mysql-community-libs-compat                        x86_64                        5.6.20-4.el6                            mysql56-community                                 1.6 M
     replacing  mysql-libs.x86_64 5.1.71-1.el6
 mysql-community-server                             x86_64                        5.6.20-4.el6                            mysql56-community                                  52 M
 mysql-utilities                                    noarch                        1.4.4-1.el6                             mysql-tools-community                             952 k
Installing for dependencies:
 libaio                                             x86_64                        0.3.107-10.el6                          base                                               21 k
 mysql-community-common                             x86_64                        5.6.20-4.el6                            mysql56-community                                 299 k
 mysql-connector-python                             noarch                        1.2.3-1.el6                             mysql-connectors-community                        191 k
 perl-DBI                                           x86_64                        1.609-4.el6                             base                                              705 k
Updating for dependencies:
 postfix                                            x86_64                        2:2.6.6-6.el6_5                         updates                                           2.0 M

Transaction Summary
==================================================================================================================================================================================
Install      10 Package(s)
Upgrade       1 Package(s)

Total size: 81 M
Is this ok [y/N]: y
Downloading Packages:
warning: rpmts_HdrFromFdno: 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 (@/mysql-community-release-el6-5.noarch)
 From   : file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : mysql-community-common-5.6.20-4.el6.x86_64                                                                                                                    1/13
  Installing : mysql-community-libs-5.6.20-4.el6.x86_64                                                                                                                      2/13
  Installing : mysql-community-libs-compat-5.6.20-4.el6.x86_64                                                                                                               3/13
  Installing : mysql-community-client-5.6.20-4.el6.x86_64                                                                                                                    4/13
  Installing : libaio-0.3.107-10.el6.x86_64                                                                                                                                  5/13
  Installing : perl-DBI-1.609-4.el6.x86_64                                                                                                                                   6/13
  Installing : mysql-connector-python-1.2.3-1.el6.noarch                                                                                                                     7/13
  Installing : mysql-utilities-1.4.4-1.el6.noarch                                                                                                                            8/13
  Installing : mysql-community-server-5.6.20-4.el6.x86_64                                                                                                                    9/13
  Updating   : 2:postfix-2.6.6-6.el6_5.x86_64                                                                                                                               10/13
  Installing : mysql-community-devel-5.6.20-4.el6.x86_64                                                                                                                    11/13
  Cleanup    : 2:postfix-2.6.6-2.2.el6_1.x86_64                                                                                                                             12/13
  Erasing    : mysql-libs-5.1.71-1.el6.x86_64                                                                                                                               13/13
  Verifying  : mysql-community-libs-5.6.20-4.el6.x86_64                                                                                                                      1/13
  Verifying  : mysql-community-libs-compat-5.6.20-4.el6.x86_64                                                                                                               2/13
  Verifying  : mysql-utilities-1.4.4-1.el6.noarch                                                                                                                            3/13
  Verifying  : mysql-community-client-5.6.20-4.el6.x86_64                                                                                                                    4/13
  Verifying  : mysql-community-devel-5.6.20-4.el6.x86_64                                                                                                                     5/13
  Verifying  : mysql-connector-python-1.2.3-1.el6.noarch                                                                                                                     6/13
  Verifying  : 2:postfix-2.6.6-6.el6_5.x86_64                                                                                                                                7/13
  Verifying  : mysql-community-common-5.6.20-4.el6.x86_64                                                                                                                    8/13
  Verifying  : perl-DBI-1.609-4.el6.x86_64                                                                                                                                   9/13
  Verifying  : mysql-community-server-5.6.20-4.el6.x86_64                                                                                                                   10/13
  Verifying  : libaio-0.3.107-10.el6.x86_64                                                                                                                                 11/13
  Verifying  : 2:postfix-2.6.6-2.2.el6_1.x86_64                                                                                                                             12/13
  Verifying  : mysql-libs-5.1.71-1.el6.x86_64                                                                                                                               13/13

Installed:
  mysql-community-client.x86_64 0:5.6.20-4.el6                   mysql-community-devel.x86_64 0:5.6.20-4.el6               mysql-community-libs.x86_64 0:5.6.20-4.el6
  mysql-community-libs-compat.x86_64 0:5.6.20-4.el6              mysql-community-server.x86_64 0:5.6.20-4.el6              mysql-utilities.noarch 0:1.4.4-1.el6

Dependency Installed:
  libaio.x86_64 0:0.3.107-10.el6       mysql-community-common.x86_64 0:5.6.20-4.el6       mysql-connector-python.noarch 0:1.2.3-1.el6       perl-DBI.x86_64 0:1.609-4.el6

Dependency Updated:
  postfix.x86_64 2:2.6.6-6.el6_5

Replaced:
  mysql-libs.x86_64 0:5.1.71-1.el6

Complete!
[root@vm55 ~]#
[root@vm55 ~]#
[root@vm55 ~]#
[root@vm55 ~]#
[root@vm55 ~]# /etc/init.d/mysqld start
初始化 MySQL 数据库: 2014-09-11 23:28:15 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-09-11 23:28:15 1576 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-09-11 23:28:15 1576 [Note] InnoDB: The InnoDB memory heap is disabled
2014-09-11 23:28:15 1576 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-09-11 23:28:15 1576 [Note] InnoDB: Memory barrier is not used
2014-09-11 23:28:15 1576 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-09-11 23:28:15 1576 [Note] InnoDB: Using Linux native AIO
2014-09-11 23:28:15 1576 [Note] InnoDB: Not using CPU crc32 instructions
2014-09-11 23:28:15 1576 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-09-11 23:28:15 1576 [Note] InnoDB: Completed initialization of buffer pool
2014-09-11 23:28:15 1576 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2014-09-11 23:28:15 1576 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2014-09-11 23:28:15 1576 [Note] InnoDB: Database physically writes the file full: wait...
2014-09-11 23:28:15 1576 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2014-09-11 23:28:16 1576 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2014-09-11 23:28:16 1576 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2014-09-11 23:28:16 1576 [Warning] InnoDB: New log files created, LSN=45781
2014-09-11 23:28:16 1576 [Note] InnoDB: Doublewrite buffer not found: creating new
2014-09-11 23:28:16 1576 [Note] InnoDB: Doublewrite buffer created
2014-09-11 23:28:16 1576 [Note] InnoDB: 128 rollback segment(s) are active.
2014-09-11 23:28:16 1576 [Warning] InnoDB: Creating foreign key constraint system tables.
2014-09-11 23:28:16 1576 [Note] InnoDB: Foreign key constraint system tables created
2014-09-11 23:28:16 1576 [Note] InnoDB: Creating tablespace and datafile system tables.
2014-09-11 23:28:16 1576 [Note] InnoDB: Tablespace and datafile system tables created.
2014-09-11 23:28:16 1576 [Note] InnoDB: Waiting for purge to start
2014-09-11 23:28:16 1576 [Note] InnoDB: 5.6.20 started; log sequence number 0
2014-09-11 23:28:16 1576 [Note] Binlog end
2014-09-11 23:28:16 1576 [Note] InnoDB: FTS optimize thread exiting.
2014-09-11 23:28:16 1576 [Note] InnoDB: Starting shutdown...
2014-09-11 23:28:18 1576 [Note] InnoDB: Shutdown completed; log sequence number 1625977


2014-09-11 23:28:18 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-09-11 23:28:18 1598 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-09-11 23:28:18 1598 [Note] InnoDB: The InnoDB memory heap is disabled
2014-09-11 23:28:18 1598 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-09-11 23:28:18 1598 [Note] InnoDB: Memory barrier is not used
2014-09-11 23:28:18 1598 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-09-11 23:28:18 1598 [Note] InnoDB: Using Linux native AIO
2014-09-11 23:28:18 1598 [Note] InnoDB: Not using CPU crc32 instructions
2014-09-11 23:28:18 1598 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-09-11 23:28:18 1598 [Note] InnoDB: Completed initialization of buffer pool
2014-09-11 23:28:18 1598 [Note] InnoDB: Highest supported file format is Barracuda.
2014-09-11 23:28:18 1598 [Note] InnoDB: 128 rollback segment(s) are active.
2014-09-11 23:28:18 1598 [Note] InnoDB: Waiting for purge to start
2014-09-11 23:28:18 1598 [Note] InnoDB: 5.6.20 started; log sequence number 1625977
2014-09-11 23:28:18 1598 [Note] Binlog end
2014-09-11 23:28:18 1598 [Note] InnoDB: FTS optimize thread exiting.
2014-09-11 23:28:18 1598 [Note] InnoDB: Starting shutdown...
2014-09-11 23:28:20 1598 [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 vm55.xiaorui.cc 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

                                                           [确定]
正在启动 mysqld:                                          [确定]
[root@vm55 ~]#
[root@vm55 ~]#
[root@vm55 ~]#
[root@vm55 ~]#
[root@vm55 ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.20 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, 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.

 

[ root @ vm55 ~ ] # yum install mysql mysql-devel mysql-server mysql-utilities

Loaded plugins : fastestmirror

Loading mirror speeds from cached hostfile

epel / metalink                                                                                                                                               | 5.7 kB      00 : 00

* base : mirrors . btte . net

* epel : ftp . sjtu . edu . cn

* extras : mirrors . btte . net

* updates : mirrors . btte . net

epel                                                                                                                                                       | 4.4 kB      00 : 00

epel / primary_db                                                                                                                                             | 6.3 MB      00 : 03

mysql - connectors - community                                                                                                                                 |2.5 kB      00 : 00

mysql - connectors - community / primary_db                                                                                                                       | 6.8 kB     00 : 00

mysql - tools - community                                                                                                                                      | 2.5 kB      00 : 00

mysql - tools - community / primary_db                                                                                                                           |    14kB      00 : 00

mysql56 - community                                                                                                                                           | 2.5 kB      00 : 00

mysql56 - community / primary_db                                                                                                                               |   49 kB      00 : 00

Setting up Install Process

Package mysql is obsoleted by mysql - community - client , trying to install mysql- community - client - 5.6.20 - 4.el6.x86_64 instead

Package mysql - devel is obsoleted by mysql - community - devel , trying toinstall mysql - community - devel - 5.6.20 - 4.el6.x86_64 instead

Package mysql - server is obsoleted by mysql - community - server , trying toinstall mysql - community - server - 5.6.20 - 4.el6.x86_64 instead

Resolving Dependencies

-- & gt ; Running transaction check

-- - & gt ; Package mysql - community - client . x86 _ 64 0 : 5.6.20 - 4.el6 will beinstalled

-- & gt ; Processing Dependency : mysql - community - libs ( x86 - 64 ) = 5.6.20 -4.el6 for package : mysql - community - client - 5.6.20 - 4.el6.x86_64

-- - & gt ; Package mysql - community - devel . x86 _ 64 0 : 5.6.20 - 4.el6 will beinstalled

-- - & gt ; Package mysql - community - server . x86 _ 64 0 : 5.6.20 - 4.el6 will beinstalled

-- & gt ; Processing Dependency : mysql - community - common ( x86 - 64 ) =5.6.20 - 4.el6 for package : mysql - community - server - 5.6.20 - 4.el6.x86_64

-- & gt ; Processing Dependency : perl ( DBI ) for package : mysql - community -server - 5.6.20 - 4.el6.x86_64

-- & gt ; Processing Dependency : libaio . so . 1 ( LIBAIO_0 . 4 ) ( 64bit ) forpackage : mysql - community - server - 5.6.20 - 4.el6.x86_64

-- & gt ; Processing Dependency : libaio . so . 1 ( LIBAIO_0 . 1 ) ( 64bit ) forpackage : mysql - community - server - 5.6.20 - 4.el6.x86_64

-- & gt ; Processing Dependency : libaio . so . 1 ( ) ( 64bit ) for package : mysql -community - server - 5.6.20 - 4.el6.x86_64

-- - & gt ; Package mysql - utilities . noarch 0 : 1.4.4 - 1.el6 will be installed

-- & gt ; Processing Dependency : mysql - connector - python & gt ; = 1.2.1 forpackage : mysql - utilities - 1.4.4 - 1.el6.noarch

-- & gt ; Running transaction check

-- - & gt ; Package libaio . x86 _ 64 0 : 0.3.107 - 10.el6 will be installed

-- - & gt ; Package mysql - community - common . x86 _ 64 0 : 5.6.20 - 4.el6 willbe installed

-- - & gt ; Package mysql - community - libs . x86 _ 64 0 : 5.6.20 - 4.el6 will beobsoleting

-- - & gt ; Package mysql - connector - python . noarch 0 : 1.2.3 - 1.el6 will beinstalled

-- - & gt ; Package mysql - libs . x86 _ 64 0 : 5.1.71 - 1.el6 will be obsoleted

-- & gt ; Processing Dependency : libmysqlclient . so . 16 ( ) ( 64bit ) for package :2 : postfix - 2.6.6 - 2.2.el6_1.x86_64

-- & gt ; Processing Dependency : libmysqlclient . so . 16 ( libmysqlclient_16 ) (64bit ) for package : 2 : postfix - 2.6.6 - 2.2.el6_1.x86_64

-- - & gt ; Package perl - DBI . x86 _ 64 0 : 1.609 - 4.el6 will be installed

-- & gt ; Running transaction check

-- - & gt ; Package mysql - community - libs - compat . x86 _ 64 0 : 5.6.20 - 4.el6will be obsoleting

-- - & gt ; Package postfix . x86 _ 64 2 : 2.6.6 - 2.2.el6_1 will be updated

-- - & gt ; Package postfix . x86 _ 64 2 : 2.6.6 - 6.el6_5 will be an update

-- & gt ; Finished Dependency Resolution

Dependencies Resolved

=== === === === === === === === === === === === === === === === ====== === === === === === === === === === === === === === === === === ====== === === === === === === === === === === === === === === === === ====== === === === === === =

Package                                              Arch                          Version                                 Repository                                         Size

=== === === === === === === === === === === === === === === === ====== === === === === === === === === === === === === === === === === ====== === === === === === === === === === === === === === === === === ====== === === === === === =

Installing :

mysql - community - client                             x86 _ 64                          5.6.20 -4.el6                              mysql56 - community                                    18 M

mysql - community - devel                               x86 _ 64                          5.6.20 -4.el6                              mysql56 - community                                  3.2 M

mysql - community - libs                               x86 _ 64                          5.6.20 - 4.el6                             mysql56 - community                                  1.9 M

replacing   mysql - libs . x86 _ 64 5.1.71 - 1.el6

mysql - community - libs - compat                         x86 _ 64                          5.6.20- 4.el6                              mysql56 - community                                  1.6 M

replacing   mysql - libs . x86 _ 64 5.1.71 - 1.el6

mysql - community - server                             x86 _ 64                          5.6.20 -4.el6                              mysql56 - community                                    52 M

mysql - utilities                                     noarch                          1.4.4 - 1.el6                             mysql - tools - community                              952 k

Installing for dependencies :

libaio                                             x86 _ 64                          0.3.107 - 10.el6                           base                                                21 k

mysql - community - common                             x86 _ 64                          5.6.20 -4.el6                              mysql56 - community                                  299 k

mysql - connector - python                             noarch                          1.2.3 - 1.el6                             mysql - connectors - community                          191 k

perl - DBI                                           x86 _ 64                          1.609 - 4.el6                             base                                                705 k

Updating for dependencies :

postfix                                             x86 _ 64                          2 : 2.6.6 - 6.el6_5                         updates                                            2.0 M

Transaction Summary

=== === === === === === === === === === === === === === === === ====== === === === === === === === === === === === === === === === === ====== === === === === === === === === === === === === === === === === ====== === === === === === =

Install        10 Package ( s )

Upgrade        1 Package ( s )

Total download size : 81 M

Is this ok [ y / N ] : y

Downloading Packages :

( 1 / 11 ) : libaio - 0.3.107 - 10.el6.x86_64.rpm                                                                                                                   |    21 kB     00 : 00

( 2 / 11 ) : mysql - community - client - 5.6.20 - 4.el6.x86_64.rpm                                                                                                     |    18 MB      00 : 49

( 3 / 11 ) : mysql - community - common - 5.6.20 - 4.el6.x86_64.rpm                                                                                                     | 299 kB      00 : 00

( 4 / 11 ) : mysql - community - devel - 5.6.20 - 4.el6.x86_64.rpm                                                                                                       | 3.2 MB      00 : 11

( 5 / 11 ) : mysql - community - libs - 5.6.20 - 4.el6.x86_64.rpm                                                                                                       | 1.9 MB      00 : 05

( 6 / 11 ) : mysql - community - libs - compat - 5.6.20 - 4.el6.x86_64.rpm                                                                                                 | 1.6 MB      00 : 07

( 7 / 11 ) : mysql - community - server - 5.6.20 - 4.el6.x86_64.rpm                    ( 57% ) 41 % [ === === === === === === === === =                                      ] 328 kB /s |    22 MB      01 : 35 ETA

( 7 / 11 ) : mysql - community - server - 5.6.20 - 4.el6.x86_64.rpm                                                                                                     |    52 MB      02 : 53

( 8 / 11 ) : mysql - connector - python - 1.2.3 - 1.el6.noarch.rpm                                                                                                       | 191 kB      00 : 00

( 9 / 11 ) : mysql - utilities - 1.4.4 - 1.el6.noarch.rpm                                                                                                             | 952 kB      00 :03

( 10 / 11 ) : perl - DBI - 1.609 - 4.el6.x86_64.rpm                                                                                                                   | 705 kB     00 : 00

( 11 / 11 ) : postfix - 2.6.6 - 6.el6_5.x86_64.rpm                                                                                                                   | 2.0 MB     00 : 01

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ---- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ---- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Total                                                                                                                                             324 kB / s |    81 MB      04 : 14

warning : rpmts_HdrFromFdno : 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 & lt ; mysql - build @ oss . oracle . com & gt;

Package : mysql - community - release - el6 - 5.noarch ( @ / mysql - community -release - el6 - 5.noarch )

From    : file : / etc / pki / rpm - gpg / RPM - GPG - KEY - mysql

Is this ok [ y / N ] :

Didn 't install any keys

[root@vm55 ~]#

[root@vm55 ~]#

[root@vm55 ~]# yum install mysql mysql-devel mysql-server mysql-utilities

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* base: mirrors.btte.net

* epel: ftp.sjtu.edu.cn

* extras: mirrors.btte.net

* updates: mirrors.btte.net

Setting up Install Process

Package mysql is obsoleted by mysql-community-client, trying to install mysql-community-client-5.6.20-4.el6.x86_64 instead

Package mysql-devel is obsoleted by mysql-community-devel, trying to install mysql-community-devel-5.6.20-4.el6.x86_64 instead

Package mysql-server is obsoleted by mysql-community-server, trying to install mysql-community-server-5.6.20-4.el6.x86_64 instead

Resolving Dependencies

--> Running transaction check

---> Package mysql-community-client.x86_64 0:5.6.20-4.el6 will be installed

--> Processing Dependency: mysql-community-libs(x86-64) = 5.6.20-4.el6 for package: mysql-community-client-5.6.20-4.el6.x86_64

---> Package mysql-community-devel.x86_64 0:5.6.20-4.el6 will be installed

---> Package mysql-community-server.x86_64 0:5.6.20-4.el6 will be installed

--> Processing Dependency: mysql-community-common(x86-64) = 5.6.20-4.el6 for package: mysql-community-server-5.6.20-4.el6.x86_64

--> Processing Dependency: perl(DBI) for package: mysql-community-server-5.6.20-4.el6.x86_64

--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-community-server-5.6.20-4.el6.x86_64

--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-community-server-5.6.20-4.el6.x86_64

--> Processing Dependency: libaio.so.1()(64bit) for package: mysql-community-server-5.6.20-4.el6.x86_64

---> Package mysql-utilities.noarch 0:1.4.4-1.el6 will be installed

--> Processing Dependency: mysql-connector-python >= 1.2.1 for package: mysql-utilities-1.4.4-1.el6.noarch

--> Running transaction check

---> Package libaio.x86_64 0:0.3.107-10.el6 will be installed

---> Package mysql-community-common.x86_64 0:5.6.20-4.el6 will be installed

---> Package mysql-community-libs.x86_64 0:5.6.20-4.el6 will be obsoleting

---> Package mysql-connector-python.noarch 0:1.2.3-1.el6 will be installed

---> Package mysql-libs.x86_64 0:5.1.71-1.el6 will be obsoleted

--> 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

---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed

--> Running transaction check

---> Package mysql-community-libs-compat.x86_64 0:5.6.20-4.el6 will be obsoleting

---> Package postfix.x86_64 2:2.6.6-2.2.el6_1 will be updated

---> Package postfix.x86_64 2:2.6.6-6.el6_5 will be an update

--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================

Package                                            Arch                          Version                                 Repository                                         Size

==================================================================================================================================================================================

Installing:

mysql-community-client                             x86_64                        5.6.20-4.el6                            mysql56-community                                  18 M

mysql-community-devel                              x86_64                        5.6.20-4.el6                            mysql56-community                                 3.2 M

mysql-community-libs                               x86_64                        5.6.20-4.el6                            mysql56-community                                 1.9 M

replacing  mysql-libs.x86_64 5.1.71-1.el6

mysql-community-libs-compat                        x86_64                        5.6.20-4.el6                            mysql56-community                                 1.6 M

replacing  mysql-libs.x86_64 5.1.71-1.el6

mysql-community-server                             x86_64                        5.6.20-4.el6                            mysql56-community                                  52 M

mysql-utilities                                    noarch                        1.4.4-1.el6                             mysql-tools-community                             952 k

Installing for dependencies:

libaio                                             x86_64                        0.3.107-10.el6                          base                                               21 k

mysql-community-common                             x86_64                        5.6.20-4.el6                            mysql56-community                                 299 k

mysql-connector-python                             noarch                        1.2.3-1.el6                             mysql-connectors-community                        191 k

perl-DBI                                           x86_64                        1.609-4.el6                             base                                              705 k

Updating for dependencies:

postfix                                            x86_64                        2:2.6.6-6.el6_5                         updates                                           2.0 M

Transaction Summary

==================================================================================================================================================================================

Install      10 Package(s)

Upgrade       1 Package(s)

Total size: 81 M

Is this ok [y/N]: y

Downloading Packages:

warning: rpmts_HdrFromFdno: 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 (@/mysql-community-release-el6-5.noarch)

From   : file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

Is this ok [y/N]: y

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : mysql-community-common-5.6.20-4.el6.x86_64                                                                                                                    1/13

Installing : mysql-community-libs-5.6.20-4.el6.x86_64                                                                                                                      2/13

Installing : mysql-community-libs-compat-5.6.20-4.el6.x86_64                                                                                                               3/13

Installing : mysql-community-client-5.6.20-4.el6.x86_64                                                                                                                    4/13

Installing : libaio-0.3.107-10.el6.x86_64                                                                                                                                  5/13

Installing : perl-DBI-1.609-4.el6.x86_64                                                                                                                                   6/13

Installing : mysql-connector-python-1.2.3-1.el6.noarch                                                                                                                     7/13

Installing : mysql-utilities-1.4.4-1.el6.noarch                                                                                                                            8/13

Installing : mysql-community-server-5.6.20-4.el6.x86_64                                                                                                                    9/13

Updating   : 2:postfix-2.6.6-6.el6_5.x86_64                                                                                                                               10/13

Installing : mysql-community-devel-5.6.20-4.el6.x86_64                                                                                                                    11/13

Cleanup    : 2:postfix-2.6.6-2.2.el6_1.x86_64                                                                                                                             12/13

Erasing    : mysql-libs-5.1.71-1.el6.x86_64                                                                                                                               13/13

Verifying  : mysql-community-libs-5.6.20-4.el6.x86_64                                                                                                                      1/13

Verifying  : mysql-community-libs-compat-5.6.20-4.el6.x86_64                                                                                                               2/13

Verifying  : mysql-utilities-1.4.4-1.el6.noarch                                                                                                                            3/13

Verifying  : mysql-community-client-5.6.20-4.el6.x86_64                                                                                                                    4/13

Verifying  : mysql-community-devel-5.6.20-4.el6.x86_64                                                                                                                     5/13

Verifying  : mysql-connector-python-1.2.3-1.el6.noarch                                                                                                                     6/13

Verifying  : 2:postfix-2.6.6-6.el6_5.x86_64                                                                                                                                7/13

Verifying  : mysql-community-common-5.6.20-4.el6.x86_64                                                                                                                    8/13

Verifying  : perl-DBI-1.609-4.el6.x86_64                                                                                                                                   9/13

Verifying  : mysql-community-server-5.6.20-4.el6.x86_64                                                                                                                   10/13

Verifying  : libaio-0.3.107-10.el6.x86_64                                                                                                                                 11/13

Verifying  : 2:postfix-2.6.6-2.2.el6_1.x86_64                                                                                                                             12/13

Verifying  : mysql-libs-5.1.71-1.el6.x86_64                                                                                                                               13/13

Installed:

mysql-community-client.x86_64 0:5.6.20-4.el6                   mysql-community-devel.x86_64 0:5.6.20-4.el6               mysql-community-libs.x86_64 0:5.6.20-4.el6

mysql-community-libs-compat.x86_64 0:5.6.20-4.el6              mysql-community-server.x86_64 0:5.6.20-4.el6              mysql-utilities.noarch 0:1.4.4-1.el6

Dependency Installed:

libaio.x86_64 0:0.3.107-10.el6       mysql-community-common.x86_64 0:5.6.20-4.el6       mysql-connector-python.noarch 0:1.2.3-1.el6       perl-DBI.x86_64 0:1.609-4.el6

Dependency Updated:

postfix.x86_64 2:2.6.6-6.el6_5

Replaced:

mysql-libs.x86_64 0:5.1.71-1.el6

Complete!

[root@vm55 ~]#

[root@vm55 ~]#

[root@vm55 ~]#

[root@vm55 ~]#

[root@vm55 ~]# /etc/init.d/mysqld start

初始化 MySQL 数据库: 2014-09-11 23:28:15 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2014-09-11 23:28:15 1576 [Note] InnoDB: Using atomics to ref count buffer pool pages

2014-09-11 23:28:15 1576 [Note] InnoDB: The InnoDB memory heap is disabled

2014-09-11 23:28:15 1576 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2014-09-11 23:28:15 1576 [Note] InnoDB: Memory barrier is not used

2014-09-11 23:28:15 1576 [Note] InnoDB: Compressed tables use zlib 1.2.3

2014-09-11 23:28:15 1576 [Note] InnoDB: Using Linux native AIO

2014-09-11 23:28:15 1576 [Note] InnoDB: Not using CPU crc32 instructions

2014-09-11 23:28:15 1576 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2014-09-11 23:28:15 1576 [Note] InnoDB: Completed initialization of buffer pool

2014-09-11 23:28:15 1576 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!

2014-09-11 23:28:15 1576 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB

2014-09-11 23:28:15 1576 [Note] InnoDB: Database physically writes the file full: wait...

2014-09-11 23:28:15 1576 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB

2014-09-11 23:28:16 1576 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB

2014-09-11 23:28:16 1576 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0

2014-09-11 23:28:16 1576 [Warning] InnoDB: New log files created, LSN=45781

2014-09-11 23:28:16 1576 [Note] InnoDB: Doublewrite buffer not found: creating new

2014-09-11 23:28:16 1576 [Note] InnoDB: Doublewrite buffer created

2014-09-11 23:28:16 1576 [Note] InnoDB: 128 rollback segment(s) are active.

2014-09-11 23:28:16 1576 [Warning] InnoDB: Creating foreign key constraint system tables.

2014-09-11 23:28:16 1576 [Note] InnoDB: Foreign key constraint system tables created

2014-09-11 23:28:16 1576 [Note] InnoDB: Creating tablespace and datafile system tables.

2014-09-11 23:28:16 1576 [Note] InnoDB: Tablespace and datafile system tables created.

2014-09-11 23:28:16 1576 [Note] InnoDB: Waiting for purge to start

2014-09-11 23:28:16 1576 [Note] InnoDB: 5.6.20 started; log sequence number 0

2014-09-11 23:28:16 1576 [Note] Binlog end

2014-09-11 23:28:16 1576 [Note] InnoDB: FTS optimize thread exiting.

2014-09-11 23:28:16 1576 [Note] InnoDB: Starting shutdown...

2014-09-11 23:28:18 1576 [Note] InnoDB: Shutdown completed; log sequence number 1625977

2014-09-11 23:28:18 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2014-09-11 23:28:18 1598 [Note] InnoDB: Using atomics to ref count buffer pool pages

2014-09-11 23:28:18 1598 [Note] InnoDB: The InnoDB memory heap is disabled

2014-09-11 23:28:18 1598 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2014-09-11 23:28:18 1598 [Note] InnoDB: Memory barrier is not used

2014-09-11 23:28:18 1598 [Note] InnoDB: Compressed tables use zlib 1.2.3

2014-09-11 23:28:18 1598 [Note] InnoDB: Using Linux native AIO

2014-09-11 23:28:18 1598 [Note] InnoDB: Not using CPU crc32 instructions

2014-09-11 23:28:18 1598 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2014-09-11 23:28:18 1598 [Note] InnoDB: Completed initialization of buffer pool

2014-09-11 23:28:18 1598 [Note] InnoDB: Highest supported file format is Barracuda.

2014-09-11 23:28:18 1598 [Note] InnoDB: 128 rollback segment(s) are active.

2014-09-11 23:28:18 1598 [Note] InnoDB: Waiting for purge to start

2014-09-11 23:28:18 1598 [Note] InnoDB: 5.6.20 started; log sequence number 1625977

2014-09-11 23:28:18 1598 [Note] Binlog end

2014-09-11 23:28:18 1598 [Note] InnoDB: FTS optimize thread exiting.

2014-09-11 23:28:18 1598 [Note] InnoDB: Starting shutdown...

2014-09-11 23:28:20 1598 [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 vm55.xiaorui.cc 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

[确定]

正在启动 mysqld:                                          [确定]

[root@vm55 ~]#

[root@vm55 ~]#

[root@vm55 ~]#

[root@vm55 ~]#

[root@vm55 ~]# mysql -uroot -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.6.20 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, 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表分区,实现起来很简单,就是为了提高有多个磁盘的时候,提高io的吞吐 。  但是貌似mysql5.5不能实现指定目录的方式。 所以才用的mysql5.6 。

 

 

ceshi | CREATE TABLE `ceshi` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `department` varchar(32) DEFAULT NULL,
  `dbname` varchar(64) DEFAULT NULL,
  `user` varchar(32) DEFAULT NULL,
  `note` varchar(128) DEFAULT NULL,
  `tosql` varchar(10000) DEFAULT NULL,
  `result` varchar(10000) DEFAULT NULL,
  `want_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=400390 DEFAULT CHARSET=utf8
/*!50100 PARTITION BY RANGE (id)
(PARTITION p0 VALUES LESS THAN (50000) DATA DIRECTORY = '/var/rui0/data' ENGINE = InnoDB,
 PARTITION p1 VALUES LESS THAN (100000) DATA DIRECTORY = '/var/rui1/data' ENGINE = InnoDB,
 PARTITION p2 VALUES LESS THAN (300000) DATA DIRECTORY = '/var/rui2/data' ENGINE = InnoDB,
 PARTITION p3 VALUES LESS THAN (400000) DATA DIRECTORY = '/var/rui3/data' ENGINE = InnoDB,
 PARTITION p4 VALUES LESS THAN (1000000) DATA DIRECTORY = '/var/rui4/data' ENGINE = InnoDB) */ |

 

ceshi | CREATE TABLE ` ceshi ` (

` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,

` department ` varchar ( 32 ) DEFAULT NULL ,

` dbname ` varchar ( 64 ) DEFAULT NULL ,

` user ` varchar ( 32 ) DEFAULT NULL ,

` note ` varchar ( 128 ) DEFAULT NULL ,

` tosql ` varchar ( 10000 ) DEFAULT NULL ,

` result ` varchar ( 10000 ) DEFAULT NULL ,

` want_date ` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,

PRIMARY KEY ( ` id ` )

) ENGINE = InnoDB AUTO_INCREMENT = 400390 DEFAULT CHARSET = utf8

/*!50100 PARTITION BY RANGE (id)

(PARTITION p0 VALUES LESS THAN (50000) DATA DIRECTORY = '/var/rui0/data' ENGINE = InnoDB,

PARTITION p1 VALUES LESS THAN (100000) DATA DIRECTORY = '/var/rui1/data' ENGINE = InnoDB,

PARTITION p2 VALUES LESS THAN (300000) DATA DIRECTORY = '/var/rui2/data' ENGINE = InnoDB,

PARTITION p3 VALUES LESS THAN (400000) DATA DIRECTORY = '/var/rui3/data' ENGINE = InnoDB,

PARTITION p4 VALUES LESS THAN (1000000) DATA DIRECTORY = '/var/rui4/data' ENGINE = InnoDB) */ |

咱们再来看看在目录是啥情况。 

 

 

[root@slave1 var]# ll /var|grep rui
drwxr-xr-x   3 mysql     mysql        4096  912 14:32 rui0
drwxr-xr-x   3 mysql     mysql        4096  912 14:32 rui1
drwxr-xr-x   3 mysql     mysql        4096  912 14:32 rui2
drwxr-xr-x   3 mysql     mysql        4096  912 14:32 rui3
drwxr-xr-x   3 mysql     mysql        4096  912 16:46 rui4
[root@slave1 var]#

 

[ root @ slave1 var ] # ll /var|grep rui

drwxr - xr - x    3 mysql     mysql          4096    9 月 12 14 : 32 rui0

drwxr - xr - x    3 mysql     mysql          4096    9 月 12 14 : 32 rui1

drwxr - xr - x    3 mysql     mysql          4096    9 月 12 14 : 32 rui2

drwxr - xr - x    3 mysql     mysql          4096    9 月 12 14 : 32 rui3

drwxr - xr - x    3 mysql     mysql          4096    9 月 12 16 : 46 rui4

[ root @ slave1 var ] #

这就行了 ~

 
分享到:
评论

相关推荐

    CentOS6.5一键安装Mysql5.6

    在Linux系统中,CentOS 6.5是一个广泛使用的版本,而MySQL 5.6则是一个流行的开源数据库管理系统。本文将详细介绍如何在CentOS 6.5上进行MySQL 5.6的一键安装过程,包括必要的环境准备、安装步骤、配置优化以及安全...

    CentOS6.5下YUM安装最新MySQL5.7.12(王三旗亲自整理,最简单明了)

    CentOS6.5下YUM安装最新MySQL5.7.12

    centos 和 linux 6.5 yum包

    总的来说,"centos 和 linux 6.5 yum包"涉及到的是如何在两个不同的Linux发行版上利用Yum工具管理和安装软件包的过程。了解Yum的工作原理、如何配置仓库以及如何正确处理软件包的安装,对于使用这些系统的系统管理员...

    centos6.5安装mysql5.6

    在本文中,我们将详细探讨如何在CentOS 6.5系统上安装MySQL 5.6。这个过程涉及多个步骤,包括检查系统环境、删除遗留的服务和文件、安装必要的软件包、下载和配置MySQL源代码以及最后的安装和配置。让我们逐步了解每...

    CentOS 6.5 最新可用的 Yum 源

    CentOS 6.5 的 软件源很多官方已经停止维护,该文件包内配置好的yum源是可以正常使用的。将原/etc/yum.repos.d/目录下原来的 .repo 备份, 然后把本文件包内的repo文件复制过去, yum clean all 后,再 yum ...

    linux CentOS6.5 yum安装mysql5.6

    在Linux环境中,特别是对于CentOS 6.5这样的操作系统,安装MySQL数据库通常依赖于`yum`包管理器。本文将详细介绍如何使用`yum`来安装MySQL 5.6。以下是安装过程的详细步骤: 1. **检查系统是否已安装MySQL**: ...

    centos安装mysql5.6.docx

    安装 MySQL 的 yum 源后,我们可以使用以下命令安装 MySQL 5.6: `yum install mysql-community-server -y` 启动 MySQL 并设置开机启动 安装 MySQL 5.6 后,我们需要启动 MySQL 并设置开机启动。可以使用以下命令...

    CentOS 7.2 Yum编译安装MySQL 5.6

    在本文中,我们将深入探讨如何在CentOS 7.2操作系统上使用Yum工具编译安装MySQL 5.6。这个过程对于系统管理员来说非常重要,因为它允许他们为自己的服务器或开发环境设置一个稳定且可定制的数据库服务。 首先,我们...

    centos7下mysql 5.6离线安装包,附操作手册

    本篇文章将详细讲解如何在CentOS 7上通过离线方式安装MySQL 5.6,以及如何利用附带的操作手册来辅助安装。 首先,我们有"MySQL-5.6.46-1.el7.x86_64.rpm-bundle.tar"这个压缩包,它是MySQL 5.6针对CentOS 7的RPM...

    centos6.5 rpm安装yum工具

    解压资源后进入资源目录,运行命令rpm -ivh,需要安装的包有yum-plugin-fastestmirror-1.1.30-14.el6.noarch yum-plugin-security-1.1.30-14.el6.noarch yum-metadata-parser-1.1.2-16.el6.x86_64 yum-utils-1.1.30-...

    centos6 安装mysql5.6.x版本

    使用`yum`来安装MySQL 5.6.x,执行以下命令: ``` sudo yum install mysql-server ``` 这个命令会安装MySQL服务器及其相关依赖。 3. **自定义安装位置** 默认情况下,MySQL的数据存储位置在`/var/lib/mysql`...

    centos 6.5配置mysql5.5

    - **分区技术**:对于非常大的表,可以考虑使用分区技术来提高查询效率。 通过上述步骤,可以在 CentOS 6.5 上成功安装并配置 MySQL 5.5 数据库服务。在实际部署过程中,还需根据具体的业务需求和技术环境进行相应...

    Centos6.5 镜像文件下载

    ### Centos6.5镜像文件下载与安装详解 #### 一、CentOS 6.5简介 CentOS是Community ENTerprise Operating System的缩写,是一个基于Linux内核的操作系统,它主要提供了企业级的计算环境。CentOS 6.5作为CentOS 6...

    Centos6.5下安装Mysql5.7+的脚本及安装手册

    Centos6.5下安装Mysql5.7+的脚本及安装手册。 安装包需要从网上下载,我测试的安装包为mysql-5.7.10-linux-glibc2.5-x86_64.tar.gz,500多M,上传不了。注意:必须是二进制安装版的,不能是rpm或源码版的。 经我测试...

    Centos 6.5下安装MySQL 5.6教程

    在本文中,我们将深入探讨如何在CentOS 6.5操作系统上安装MySQL 5.6。MySQL是一个流行的开源关系型数据库管理系统(RDBMS),它为开发者提供了强大的数据存储和管理能力。下面是安装MySQL 5.6的详细步骤: 1. **...

    CentOS 6.5下yum安装 MySQL-5.5全过程图文教程

    下面通过两种方法给大家介绍CentOS 6.5下yum安装 MySQL-5.5全过程,一起学习吧。 方法一: 具体方法和步骤如下所示: 1.第一步就是看linu是否安装了mysql,经过rpm -qa|grep mysql查看到centos下安装了mysql5.1,那...

    CentOS5安装Mysql5.6.txt

    CentOS5下安装Mysql5.6.txt

    centos 6.5 最小化安装mysql

    centos 6.5 最小化安装mysql,方便快捷。。。。。。。。。。。。。。。。。。。。。。。

    CentOS6.5安装jdk,Tomcat,MYsql.doc

    总结起来,在CentOS 6.5上安装JDK、Tomcat和MySQL,涉及到了软件包管理器`yum`的使用,文件传输工具如`wget`,以及对系统服务的管理。理解并掌握这些步骤,将有助于你在Linux环境中快速搭建和管理Java Web服务。同时...

Global site tag (gtag.js) - Google Analytics