MySQL Database series of Centos6.5 system under the RPM package installation MySQL5.6

Source: Internet
Author: User

    1. View operating system-related information.

[Email protected]_db1 ~]# Cat/etc/issuecentos Release 6.5 (Final) Kernel \ r on an \m[[email protected]_db1 ~]# Uname-ali Nux bj_db1 2.6.32-431.el6.x86_64 #1 SMP Fri (03:15:09 UTC) x86_64 x86_64 x86_64 Gnu/linux

2. Create the directory where you want to download the RPM package.

[Email protected]_db1 ~]# mkdir-p/taokey/tools

3. Check if there is a system with the MySQL RPM package, if any, you need to delete the old RPM package.

[[Email protected]_db1 ~]# Rpm-qa | grep mysqlmysql-libs-5.1.71-1.el6.x86_64[[email protected]_db1 ~]# yum-y Remove Mysql-libs-5.1*[[email protected]_db1 ~]# Rpm-qa | grep mysql[[email protected]_db1 ~]#

4. Download the RPM package required to install MySQL-5.6.21 on the MySQL website.

Need to download three RPM packages:

mysql-client-5.6.21-1.rhel5.x86_64.rpm mysql-devel-5.6.21-1.rhel5.x86_64.rpm MySQL-server-5.6.21-1.rhel5.x86_64. Rpm[[email protected]_db1 ~]# cd/taokey/tools/[[email protected]_db1 tools]# wget http://dev.mysql.com/Downloads/ Mysql-5.6/mysql-server-5.6.21-1.rhel5.x86_64.rpm[[email protected]_db1 tools]# wget http://dev.mysql.com/Downloads /mysql-5.6/mysql-devel-5.6.21-1.rhel5.x86_64.rpm[[email protected]_db1 tools]# wget http://dev.mysql.com/Downloads /mysql-5.6/mysql-client-5.6.21-1.rhel5.x86_64.rpm

5. After downloading, install three RPM packages.

[Email protected]_db1 tools]# RPM-IVH mysql-server-5.6.21-1.rhel5.x86_64.rpm

error:failed dependencies:

Libaio.so.1 () (64bit) is needed by mysql-server-5.6.21-1.rhel5.x86_64

Libaio.so.1 (libaio_0.1) (64bit) is needed by mysql-server-5.6.21-1.rhel5.x86_64

Libaio.so.1 (libaio_0.4) (64bit) is needed by mysql-server-5.6.21-1.rhel5.x86_64

Install Mysql-server error, the reason is not installed Libaio, the system is missing libaio.so this package, the bottom yum install libaio.so package.

[[EMAIL PROTECTED]_DB1 TOOLS]# YUM INSTALL -Y LIBAIO[[EMAIL PROTECTED]_DB1  tools]# rpm -ivh MySQL-server-5.6.21-1.rhel5.x86_64.rpm[[email protected]_db1  tools]# rpm -ivh mysql-client-5.6.21-1.rhel5.x86_64.rpm preparing...                 ################################ ########### [100%]   1:mysql-client            ########################################### [100%][[email protected]_db1 tools]#  rpm -ivh MySQL-devel-5.6.21-1.rhel5.x86_64.rpm Preparing...                 ###########################################  [100%]   1:MySQL-devel             ########################################### [100%] 

6. Modify the configuration file location.

[Email protected]_db1 tools]# cp/usr/share/mysql/my-default.cnf/etc/my.cnf

7. Initialize MySQL and modify the default root password for MySQL.

[[Email protected]_db1 tools]# /usr/bin/mysql_install_db[[email protected]_db1 tools] # ps -ef | grep mysqlroot      2188      1  0 14:48 pts/1    00:00:00 /bin/sh /usr/bin/ mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/bj_db1.pidmysql      2303  2188 30 14:48 pts/1    00:00:02 /usr/sbin/ Mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user =mysql --log-error=/var/lib/mysql/bj_db1.err --pid-file=/var/lib/mysql/bj_db1.pidroot       2331  1853  0 14:49 pts/1     00:00:00 grep mysql[[email protected]_db1 tools]# netstat -anpt | grep  3306tcp        0      0 :::3306                      :::*                          LISTEN      2303/mysqld[[email  Protected]_db1 tools]# more /root/.mysql_secret# the random password set  for the root user at Thu Apr  9 14:43:59 2015  ( Local time):  f6k3v_xggfolqein[[email protected]_db1 tools]# mysql -uroot - pf6k3v_xggfolqeinwarning: using a password on the command line  Interface can be insecure. welcome to the mysql monitor.  commands end with ; or \g.your mysql connection id is 1server version: 5.6.21copyright  (c)  2000, 2014, oracle and/or its affiliates. all rights reserved. oracle is a registered trademark of oracle corporation and/or  Itsaffiliates. other names may be trademarks of their respectiveowners . type  ' help; '  or  ' \h '  for help. Type  ' \c '  to clear the current input  statement.mysql> set password = password (' 123.com ');  mysql> exitbye[ [email protected]_db1 tools]# mysql -uroot -p123.comwarning: using a  Password on the command line interface can be insecure. Welcome to the mysql monitor.  commands end with ; or \ G.your mysql connection id is 6server version: 5.6.21 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  Itsaffiliates. other names may be trademarks of their respectiveowners . type  ' help; '  or  ' \h '  for help. Type  ' \c '  to clear the current input  statement.mysql>

8. Set up the MySQL service to boot from.

[[Email protected]_db1 tools]# chkconfig mysql on[[email protected]_db1 tools]# chkconfig mysql--listmysql 0:of F 1:off 2:on 3:on 4:on 5:on 6:off

To this end, install the MySQL5.6 version of the database with RPM installation complete, thank you.

This article from the "Years in the passing, shining still in" blog, please be sure to keep this source http://taokey.blog.51cto.com/4633273/1630561

MySQL Database series of Centos6.5 system under the RPM package installation MySQL5.6

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.