Centos MySQL5.6 Installation Method

Source: Internet
Author: User
Tags local time install perl

1. Download RPM Package

Determine the system version first

[Email protected]/]# cat/proc/version
Linux version 2.6.32-431.el6.x86_64 ([email protected]) (GCC version 4.4.7 20120313 (Red Hat 4.4.7-4) (gcc)) #1 SMP Fri N OV 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

[Email protected] mysql]# RPM-IVH mysql-server-5.6.22-1.el6.x86_64.rpm

[Email protected] mysql]# RPM-IVH mysql-devel-5.6.22-1.el6.x86_64.rpm

[Email protected] mysql]# RPM-IVH mysql-client-5.6.22-1.el6.x86_64.rpm

Missing libaio.so bag found
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

Workaround

[email protected] mysql]# Yum install Libaio

[[email protected] mysql]# Yum Install Perl

If you are dealing with MySQL version conflicts, first remove the installed MySQL

[Email protected] mysql]# yum-y Remove mysql-libs-5.1.71*


3. Modify the configuration file location

[Email protected] mysql]# CP/USR/SHARE/MYSQL/MY-DEFAULT.CNF/ETC/MY.CNF


4, initial MySQL and configuration password

[Email protected] mysql]#/usr/bin/mysql_install_db

[[Email protected] mysql]# service MySQL start

[Email protected] mysql]# Cat/root/.mysql_secret
# The random password set for the root user at Sat Feb 7 10:54:24 (local time): VOKVW3VPO_3LIA3C

[Email protected] mysql]# mysql-uroot-pvokvw3vpo_3lia3c

mysql> SET PASSWORD = PASSWORD (' 2345678 ');

Mysql> exit
[Email protected] mysql]# mysql-uroot-pp#ssw0rd


5. Telnet 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 (' 234567 ') where user= ' root ';

mysql> Update user set host= '% ' where host= ' localhost ';



6. Set Boot from boot

[[email protected] mysql]# chkconfig MySQL on
[Email protected] mysql]# Chkconfig--list | grep MySQL
MySQL 0:off 1:off 2:on 3:on 4:on 5:on 6:off


7. View MySQL configuration file bit

[Email protected] mysql]# mysqld--verbose--help | Grep-a 1 ' Default options '


8,mysql Default installation Location

    1. /var/lib/mysql/#数据库目录
    2. /usr/share/mysql #配置文件目录
    3. /usr/bin #相关命令目录
    4. /etc/init.d/mysql #启动脚本

9, configuring the character set

modifying character set and data store paths

Configuration /etc/my.cnf file, modify the data storage path, themysql.sock path, and the default encoding utf-8.



Centos MySQL5.6 Installation Method

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.