Install MySQL5.5 and centosmysql5.5 in RPM Mode Under CentOS/RHEL 6 +

Source: Internet
Author: User

Install MySQL5.5 and centosmysql5.5 in RPM Mode Under CentOS/RHEL 6 +

Go to http://dev.mysql.com/downloads/mysql/5.5.html#downloads:

Download the following three files respectively (because my machine is 32-bit, the following is a 32-bit 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 through breakpoint transmission.

 

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/ wget-c

 

After the download is complete, start the installation:

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 check whether the installation is successful.

Mysql

 

If the following error message is displayed:

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

The mysql service has not been started. Enter service mysql start to start the mysql service.

Service mysql start

 

Then enter mysql. If the following message is displayed, it indicates that the operation is successful.

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) 2000,201 1, Oracle and/or its affiliates. All rights reserved.

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

Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.

 

The default password for the first installation is null. You can use the following command to change the root password,

Mysqladmin-u root passwordMypassword

MypasswordThe new password you set

Then log on again

Mysql-u root-p

 

MySQL installed in the rpm package does not install/etc/my. cnf file, solution, just need to copy the my-huge.cnf file under the/usr/share/mysql directory to the/etc directory, and renamed my. cnf

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 enable remote access:

// Grant data access permissions to any host
Mysql> grant all privileges on *. * TO 'root' @ '%' identified by 'yourpassword' WITH GRANT OPTION

// Make the modification take effect
Mysql> FLUSH PRIVILEGES

If remote access is still not available, it is likely the cause of the firewall. You can enable port 3306 in the firewall or simply turn off the firewall.


How to install MySQL51 with RPM in Linux (RHEL62)

Lz, please take a closer look at the answer upstairs, either "2b" or "pig's head". It's a waste of time to discuss with him! Do not know your specific error message?
Personal suggestion:
1. Download the rpm package according to the error message and install it!
2. Find the source code package and compile and install it!

Centos62 cannot install mysql553. errors are always reported. For details, see:

The reason may be that you have only installed the service, but not the client tool.
Install MySql with yum install

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.