Install mysql yum

Source: Internet
Author: User

Install mysql yum

 

I. Installation Problems:

First enter: http://dev.mysql.com/downloads/repo/yum/ download interface, get the rpm address

Select yum to download:

2. Download the rpm corresponding to redhat 6

Right-click to save as connection address:

Download this rpm server from a linux Server:

 

wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

 

Install repository locally

 

sudo yum localinstall mysql-community-release-el6-5.noarch.rpm
After the operation is complete, no software is installed on the server. So we have to install MySQL Server:

 

 

sudo yum install mysql-community-server

 

Mysql installation path:/var/lib/mysql

Theoretically, mysql can be started after this step is completed.

 

sudo service mysqld start
However, I reported an error when I started it.

 

 




 

View error logs:

 

cat /var/log/mysqld.log

The three files are redundant and are deleted directly. Restart and the deletion path is as follows:

Then log on directly. (The default account and password are both root and root)

 

This is even if it is installed.

Ii. Remote Logon

When I use a third-party remote connection, an error is reported. Check and find two root users, one of which is bound to the Local Machine (127.0.0.1) for logon.

 



So try to change all root passwords:

 

 

 

mysql> use mysql;
mysql> UPDATE user SET password=password("root") WHERE user='root';
mysql> flush privileges;
mysql> exit;
Then you can log on to the console.

 

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.