Install Percona(MySQL DB) Server 5.6.12 on CentOS 6.8
操作系统版本:
1 2 3 |
[root@mysql_5612 ~]# cat /etc/redhat-release CentOS release 6.8 (Final) [root@mysql_5612 ~]# |
删除本地的【mysqlclient】:
1 2 |
[root@mysql_5612 percona-mysql-5.6.12]# rpm -e --nodeps mysql-libs-5.1.73-7.el6.x86_64 [root@mysql_5612 percona-mysql-5.6.12]# |
下载MySQL Percona Server 5.6.12的安装介质:
https://www.percona.com/downloads/Percona-Server-5.6/LATEST/
将安装介质上传服务器:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@mysql_5612 percona-mysql-5.6.12]# pwd /software_me/percona-mysql-5.6.12 [root@mysql_5612 percona-mysql-5.6.12]# [root@mysql_5612 percona-mysql-5.6.12]# ls -ltr total 87396 -rw-r--r-- 1 root root 711696 Jul 17 08:43 Percona-Server-shared-56-5.6.12-rc60.4.393.rhel6.x86_64.rpm -rw-r--r-- 1 root root 2977564 Jul 17 08:43 Percona-Server-devel-56-5.6.12-rc60.4.393.rhel6.x86_64.rpm -rw-r--r-- 1 root root 6785840 Jul 17 08:51 Percona-Server-client-56-5.6.12-rc60.4.393.rhel6.x86_64.rpm -rw-r--r-- 1 root root 10767596 Jul 18 00:46 Percona-Server-test-56-5.6.12-rc60.4.393.rhel6.x86_64.rpm -rw-r--r-- 1 root root 18588372 Jul 18 00:48 Percona-Server-server-56-5.6.12-rc60.4.393.rhel6.x86_64.rpm -rw-r--r-- 1 root root 49651588 Jul 18 00:53 Percona-Server-56-debuginfo-5.6.12-rc60.4.393.rhel6.x86_64.rpm drwxr-xr-x 2 root root 4096 Jul 18 09:00 repodata [root@mysql_5612 percona-mysql-5.6.12]# |
依次安装,否则会出现依赖性问题:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
[root@mysql_5612 percona-mysql-5.6.12]# rpm -ivh Percona-Server-shared-56-5.6.12-rc60.4.393.rhel6.x86_64.rpm warning: Percona-Server-shared-56-5.6.12-rc60.4.393.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY Preparing... ########################################### [100%] 1:Percona-Server-shared-5########################################### [100%] [root@mysql_5612 percona-mysql-5.6.12]# [root@mysql_5612 percona-mysql-5.6.12]# rpm -ivh Percona-Server-client-56-5.6.12-rc60.4.393.rhel6.x86_64.rpm warning: Percona-Server-client-56-5.6.12-rc60.4.393.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY Preparing... ########################################### [100%] 1:Percona-Server-client-5########################################### [100%] [root@mysql_5612 percona-mysql-5.6.12]# [root@mysql_5612 percona-mysql-5.6.12]# rpm -ivh Percona-Server-server-56-5.6.12-rc60.4.393.rhel6.x86_64.rpm warning: Percona-Server-server-56-5.6.12-rc60.4.393.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY Preparing... ########################################### [100%] 1:Percona-Server-server-5########################################### [100%] 2017-07-18 09:16:29 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2017-07-18 09:16:29 2635 [Note] InnoDB: The InnoDB memory heap is disabled 2017-07-18 09:16:29 2635 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2017-07-18 09:16:29 2635 [Note] InnoDB: Compressed tables use zlib 1.2.3 2017-07-18 09:16:29 2635 [Note] InnoDB: Using Linux native AIO 2017-07-18 09:16:29 2635 [Note] InnoDB: Using CPU crc32 instructions 2017-07-18 09:16:29 2635 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2017-07-18 09:16:29 2635 [Note] InnoDB: Completed initialization of buffer pool 2017-07-18 09:16:29 2635 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created! 2017-07-18 09:16:29 2635 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB 2017-07-18 09:16:29 2635 [Note] InnoDB: Database physically writes the file full: wait... 2017-07-18 09:16:30 2635 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB 2017-07-18 09:16:30 2635 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB 2017-07-18 09:16:31 2635 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 2017-07-18 09:16:31 2635 [Warning] InnoDB: New log files created, LSN=45781 2017-07-18 09:16:31 2635 [Note] InnoDB: Doublewrite buffer not found: creating new 2017-07-18 09:16:31 2635 [Note] InnoDB: Doublewrite buffer created 2017-07-18 09:16:31 2635 [Note] InnoDB: 128 rollback segment(s) are active. 2017-07-18 09:16:31 2635 [Warning] InnoDB: Creating foreign key constraint system tables. 2017-07-18 09:16:31 2635 [Note] InnoDB: Foreign key constraint system tables created 2017-07-18 09:16:31 2635 [Note] InnoDB: Creating tablespace and datafile system tables. 2017-07-18 09:16:31 2635 [Note] InnoDB: Tablespace and datafile system tables created. 2017-07-18 09:16:31 2635 [Note] InnoDB: Waiting for purge to start 2017-07-18 09:16:31 2635 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.12-rc60.4 started; log sequence number 0 2017-07-18 09:16:31 2635 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work. 2017-07-18 09:16:31 2635 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work. 2017-07-18 09:16:31 2635 [Note] Binlog end 2017-07-18 09:16:31 2635 [Note] InnoDB: FTS optimize thread exiting. 2017-07-18 09:16:31 2635 [Note] InnoDB: Starting shutdown... 2017-07-18 09:16:33 2635 [Note] InnoDB: Shutdown completed; log sequence number 1625977 2017-07-18 09:16:33 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2017-07-18 09:16:33 2658 [Note] InnoDB: The InnoDB memory heap is disabled 2017-07-18 09:16:33 2658 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2017-07-18 09:16:33 2658 [Note] InnoDB: Compressed tables use zlib 1.2.3 2017-07-18 09:16:33 2658 [Note] InnoDB: Using Linux native AIO 2017-07-18 09:16:33 2658 [Note] InnoDB: Using CPU crc32 instructions 2017-07-18 09:16:33 2658 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2017-07-18 09:16:33 2658 [Note] InnoDB: Completed initialization of buffer pool 2017-07-18 09:16:33 2658 [Note] InnoDB: Highest supported file format is Barracuda. 2017-07-18 09:16:33 2658 [Note] InnoDB: 128 rollback segment(s) are active. 2017-07-18 09:16:33 2658 [Note] InnoDB: Waiting for purge to start 2017-07-18 09:16:33 2658 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.12-rc60.4 started; log sequence number 1625977 2017-07-18 09:16:33 2658 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work. 2017-07-18 09:16:33 2658 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work. 2017-07-18 09:16:33 2658 [Note] Binlog end 2017-07-18 09:16:33 2658 [Note] InnoDB: FTS optimize thread exiting. 2017-07-18 09:16:33 2658 [Note] InnoDB: Starting shutdown... 2017-07-18 09:16:35 2658 [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 mysql_5612 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 with the /usr/bin/mysqlbug script! 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 New default config file was created as /usr/my.cnf and will be used by default by the server when you start it. You may edit this file to change server settings Percona Server is distributed with several useful UDF (User Defined Function) from Maatkit. Run the following commands to create these functions: mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'" mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'" mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'" See http://code.google.com/p/maatkit/source/browse/trunk/udf for more details [root@mysql_5612 percona-mysql-5.6.12]# |
启动数据库服务:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@mysql_5612 percona-mysql-5.6.12]# service mysql status ERROR! MySQL (Percona Server) is not running [root@mysql_5612 percona-mysql-5.6.12]# [root@mysql_5612 percona-mysql-5.6.12]# service mysql start Starting MySQL (Percona Server).. SUCCESS! [root@mysql_5612 percona-mysql-5.6.12]# [root@mysql_5612 percona-mysql-5.6.12]# service mysql status SUCCESS! MySQL (Percona Server) running (2849) [root@mysql_5612 percona-mysql-5.6.12]# [root@mysql_5612 percona-mysql-5.6.12]# netstat -tupln | grep mysql tcp 0 0 :::3306 :::* LISTEN 2849/mysqld [root@mysql_5612 percona-mysql-5.6.12]# [root@mysql_5612 percona-mysql-5.6.12]# ps -ef | grep mysql root 2744 1 0 09:27 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/mysql_5612.pid mysql 2849 2744 6 09:27 pts/0 00:00:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/mysql_5612.err --pid-file=/var/lib/mysql/mysql_5612.pid root 2891 2431 0 09:27 pts/0 00:00:00 grep mysql [root@mysql_5612 percona-mysql-5.6.12]# |
登录:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
[root@mysql_5612 percona-mysql-5.6.12]# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.12-56 Percona Server (GPL), Release rc60.4, Revision 393 Copyright (c) 2009-2013 Percona Ireland Ltd. Copyright (c) 2000, 2013, 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> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+ 4 rows in set (0.00 sec) mysql> select @@version; +-----------+ | @@version | +-----------+ | 5.6.12-56 | +-----------+ 1 row in set (0.00 sec) mysql> mysql> exit Bye [root@mysql_5612 percona-mysql-5.6.12]# |
可以看到,在这个版本【5.6.12】中,默认新的库是没有口令的,而不是像之后的版本那样,默认有个随机口令。
————————————
Done。