CentosMySQL5.6 Installation Method

Source: Internet
Author: User
Tags install perl

CentosMySQL5.6 Installation Method
1. download rpm package
Determine the system version first
[Root @ xcldtc5m/] # cat/proc/version
Linux version 2.6.32-431. el6.x86 _ 64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) #1 SMP Fri Nov 22 03:15:09 UTC 2013
Download mysql rpm package
Wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.6/MySQL-server-5.6.22-1.el6.x86_64.rpm
Wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.6/MySQL-devel-5.6.22-1.el6.x86_64.rpm
Wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.6/MySQL-client-5.6.22-1.el6.x86_64.rpm
2. Installation
[Root @ xcldtc5m mysql] # rpm-ivh MySQL-server-5.6.22-1.el6.x86_64.rpm
[Root @ xcldtc5m mysql] # rpm-ivh MySQL-devel-5.6.22-1.el6.x86_64.rpm
[Root @ xcldtc5m mysql] # rpm-ivh MySQL-client-5.6.22-1.el6.x86_64.rpm
The libaio. so package is missing.
Error: Failed dependencies:
/Usr/bin/perl is needed by MySQL-server-5.6.22-1.el6.x86_64
Libaio. so.1 () (64bit) is needed by MySQL-server-5.6.22-1.el6.x86_64
Libaio. so.1 (LIBAIO_0.1) (64bit) is needed by MySQL-server-5.6.22-1.el6.x86_64
Libaio. so.1 (LIBAIO_0.4) (64bit) is needed by MySQL-server-5.6.22-1.el6.x86_64
Error: Failed dependencies:
/Usr/bin/perl is needed by MySQL-server-5.6.22-1.el6.x86_64
Solution
[Root @ xcldtc5m mysql] # yum install libaio
[Root @ xcldtc5m mysql] # yum install perl
If you are dealing with mysql version conflicts, first remove the installed mysql
[Root @ xcldtc5m mysql] # yum-y remove mysql-libs-5.1.71 *
3. modify the configuration file location
Root @ xcldtc5m mysql] # cp/usr/share/mysql/my-default.cnf/etc/my. cnf
4. New MYSQL and password configuration
[Root @ xcldtc5m mysql] #/usr/bin/mysql_install_db
[Root @ xcldtc5m mysql] # service mysql start
[Root @ xcldtc5m mysql] # cat/root/. mysql_secret
# The random password set for the root user at Sat Feb 7 10:54:24 2015 (local time): VoKvw3vpo_3LiA3c
[Root @ xcldtc5m mysql] # mysql-uroot-pVoKvw3vpo_3LiA3c
Mysql> set password = PASSWORD ('20140901 ');
Mysql> exit
[Root @ xcldtc5m mysql] # mysql-uroot-p2345678
5. Remote logon Configuration
Mysql> use mysql
Mysql> select host, user, password from user;
+ ----------- + ------ + --------------------------------------------- +
| Host | user | password |
+ ----------- + ------ + --------------------------------------------- +
| Localhost | root | * BC1C4715C23459AB982AD2D6617B4F8790161763 |
| Xcldtc5m | root | * 44CF61DA6CDeeee2085F4598F728CF221DA8F167 |
| 127.0.0.1 | root | * 44CF61DA6CD83e32085F4598F728CF221DA8F167 |
|: 1 | root | * 44CF61DA6CD86832345F4598F728CF221DA8F167 |
+ ----------- + ------ + --------------------------------------------- +
Mysql> update user set password = password ('000000') where user = 'root ';
Mysql> update user set host = '%' where host = 'localhost ';


6. Set auto-start upon startup
[Root @ xcldtc5m mysql] # chkconfig mysql on
[Root @ xcldtc5m mysql] # chkconfig -- list | grep mysql
Mysql 0: off 1: off 2: on 3: on 4: on 5: on 6: off
7. view the mysql configuration file bit
[Root @ xcldtc5m mysql] # mysqld -- verbose -- help | grep-A 1 'default options'
8. Default MYSQL installation location


/Var/lib/mysql/# Database directory/usr/share/mysql # configuration file directory/usr/bin # related command directory/etc/init. d/mysql # Start script

Related Article

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.