Linux under RPM mode installation mysql5.6 and problem solving

Source: Internet
Author: User

Installation Environment: rhel6.5 mysql5.6

1. Check if MySQL is installed under the current system

Rpm-qa | grep MySQL

2. If the above implementation of the relevant package, then need to remove, two ways

RPM-E PackageName//Normal delete rpm-e--nodeps PackageName//brute force Delete, delete package with dependency

3. Download the relevant mysql5.6 related packages

wget Http://cdn.mysql.com/archives/mysql-5.6/MySQL-client-5.6.15-1.el6.x86_64.rpmwget http://cdn.mysql.com/ Archives/mysql-5.6/mysql-devel-5.6.15-1.el6.x86_64.rpmwget http://cdn.mysql.com/archives/mysql-5.6/ mysql-server-5.6.15-1.el6.x86_64.rpm

4. Install individually, we recommend that you install the server last

RPM-IVH MYSQL-CLIENT-5.6.15-1.EL6.X86_64.RPMRPM-IVH MYSQL-DEVEL-5.6.15-1.EL6.X86_64.RPMRPM-IVH mysql-server-5.6.15-1.el6.x86_64.rpm

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M00/79/46/wKiom1aNIbzzrp1cAAU7XHCMwew230.jpg "title=" 1.jpg " Width= "720" height= "262" border= "0" hspace= "0" vspace= "0" style= "width:720px;height:262px;" alt= " Wkiom1anibzzrp1caau7xhcmwew230.jpg "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/79/47/wKiom1aNIcTS7hp5AAQ9OnnzHbM421.jpg "style=" width : 720px;height:595px; "title=" 2.jpg "width=" 720 "height=" 595 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiom1anicts7hp5aaq9onnzhbm421.jpg "/>

5. Start the service

Service MySQL Start

6. Production Server Security Configuration Wizard execution

/usr/bin/mysql_secret_installation

Note : The password must be reset here, or you cannot delete the anonymous user and exit directly. In addition, "Y" is selected by default in the production environment.

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/79/45/wKioL1aNI8_DLyFbAAKEjfAEq7A077.jpg "title=" 4.jpg " Width= "720" height= "227" border= "0" hspace= "0" vspace= "0" style= "WIDTH:720PX;HEIGHT:227PX;" alt= "wkiol1ani8_ Dlyfbaakejfaeq7a077.jpg "/>

7. Enter the database via your account password

Mysql-u root-p123456

Note : You can have spaces between-u and root, but there can be no spaces between-p and passwords.

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/79/45/wKioL1aNJQKTOGyiAAM6AVdl6Cg906.jpg "title=" 5.jpg " Width= "720" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:720px;height:400px; "alt=" Wkiol1anjqktogyiaam6avdl6cg906.jpg "/>

8. Give users permission to log on to the database

Use MySQL;     Need to access any database grant all on * * to [email protected] '% ' identified by ' 123 '; User test, password 123, log in from anywhere

9. Refresh the permissions and exit

Flush privileges; Exit

10. The installation of musql5.6 version is finished!


Error Analysis:

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


(1)/etc/init.d/mysql Status View state

(2) Service MySQL restart attempt to start

(3) Check the path with Mysql.sock

(4) Chown-r mysql:mysql/var/lib/mysql Modify Permissions

(5) View configuration file/etc/my.cnf

Linux under RPM mode installation mysql5.6 and problem solving

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.