CentOS6.5 yum installation MySQL-5.5 full process graphic tutorial _ MySQL

Source: Internet
Author: User
Installing mysql in linux is a difficult task. yum installation is usually the installation of mysql5.1. now, after unremitting efforts, I can use yum to install mysql5.5. The following two methods to introduce the whole process of yum installation MySQL-5.5 under CentOS6.5, learning it together in linux installation mysql is a difficult thing, yum installation is generally installed mysql5.1, now, after unremitting efforts, I can use yum to install mysql5.5. The following two methods to introduce you to CentOS 6.5 yum installation MySQL-5.5 process, learning together.

Method 1:

The procedure is as follows:

1. the first step is to check whether mysql is installed in linu. after rpm-qa | grep mysql shows that mysql5.1 is installed in centos, uninstall mysql.

2. the next step is to uninstall mysql5.1. Command: rpm-e mysql-libs -- nodeps

3. after mysql5.1 in yum, the installation is still 5.1. now we need to add a new repo.

Rpm-Uvh http://mirror.steadfast.net/epel/6/i386/epel-release-6-8.noarch.rpm

4. a total of two repo needs to be added. now, another repo is added.

Rpm-Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

5. now, check whether the addition is successful. yum -- enablerepo = remi, remi-test list mysql-server

The installation is successful.

6. install mysql5.5.

Yum -- enablerepo = remi, remi-test install mysql-server

7. When this occurs, you must select y. Otherwise, you will be re-installed.

8. the following figure shows that your mysql installation is successful.

9. start mysql.

/Etc/init. d/mysqld start

10. run the following command to set automatic startup. you can start mysql every time you start mysql.

Chkconfig -- levels 345 mysqld on

11. to enable MySQL security settings, enter the following command:

/Usr/bin/mysql_secure_installation

12. verify that mysql is successfully installed. If you enter the following interface, the installation is successful. Treat yourself to it.


Notes

All commands must be case sensitive.

Do not add spaces.

Be sure to perform the above installation under the root user

Method 2:

Installing mysql in linux is a difficult task. yum installation is usually the installation of mysql5.1. now, after unremitting efforts, I can use yum to install mysql5.5,

1. install the yum source for the mysql-5.5

Rpm-ivh http://repo.mysql.com/yum/mysql-5.5-community/el/6/x86_64/mysql-community-release-el6-5.noarch.rpm

2. modify the installed yum source

Edit the/etc/yum. repos. d/mysql-community.repo file, change enabled of 5.5 to 1, enabled of 5.6 to 0

# Enable to use MySQL 5.5[mysql55-community]name=MySQL 5.5 Community Serverbaseurl=http://repo.mysql.com/yum/mysql-5.5-community/el/6/$basearch/enabled=1gpgcheck=1gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql# Enable to use MySQL 5.6[mysql56-community]name=MySQL 5.6 Community Serverbaseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/enabled=0gpgcheck=1gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql 

3. install mysql-5.5

Yum install mysql-community-client mysql-community-devel mysql-community-server php-mysql

4. adjust configuration

Edit the/etc/my. cnf file

Innodb_file_per_table = 1 set InnoDB to standalone tablespace mode. each table in each database generates a Data Directory.

Innodb_buffer_pool_size = default value: 128 M. It is best to set it to 70%-80% of the operating system memory.

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.