Centos/rhel 6+ under RPM installation MySQL5.5

Source: Internet
Author: User

First go to http://dev.mysql.com/downloads/mysql/5.5.html#downloads site Download:

Download the following three files separately (since my machine is 32 bits, below is the 32-bit version of the package, if your machine is 64-bit, please download the 64-bit version):

mysql-server-5.5.16-1.rhel5.i386.rpm

mysql-client-5.5.16-1.rhel4.i386.rpm

mysql-devel-5.5.16-1.rhel4.i386.rpm

Use the wget command to download the three files using a breakpoint transfer

Wget-c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-server-5.5.16-1.rhel4.i386.rpm/from/http://mysql.spd.co.il/

Wget-c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-client-5.5.16-1.rhel4.i386.rpm/from/http://mysql.spd.co.il/

Wget-c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-devel-5.5.16-1.rhel4.i386.rpm/from/http://mysql.spd.co.il/

Start the installation after the download is complete:

RPM-IVH mysql-server-5.5.16-1.rhel4.i386.rpm mysql-client-5.5.16-1.rhel4.i386.rpm mysql-devel-5.5.16-1.rhel4.i386.rpm

After the installation is complete, enter MySQL to see if the installation is successful.

Mysql

If the following error message appears:

ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/var/lib/mysql/mysql.sock ' (2)

Description MySQL service has not started, input service MySQL start start MySQL service

Service MySQL Start

Then enter MySQL, if prompted with the following message, indicating success.

Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 1
Server version:5.5.16 MySQL Community Server (GPL)

Copyright (c), +, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.

Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.

When you first install, the default password is blank, you can use the following command to modify the root password,

mysqladmin-u root password mypassword

mypassword The new password you set for you

Then log in again

Mysql-u root–p

RPM package installed MySQL is not installed/etc/my.cnf files, the solution, only need to copy the/usr/share/mysql directory my-huge.cnf files to/etc directory, and renamed to MY.CNF can

Cp/usr/share/mysql/my-huge.cnf/etc/my.cnf

Configure remote Access

For security reasons, MySQL does not allow remote access by default, you can use the following to turn on remote access

Give any host access to data
Mysql>grant all privileges on * * to ' root ' @ '% ' identified by ' YourPassword ' with GRANT OPTION

Make the changes effective
Mysql>flush Privileges

If the remote access is still not possible, it is likely that the firewall, you can open the firewall 3306 port or simply shut down the firewall.

Centos/rhel 6+ under RPM installation MySQL5.5

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.