centos5.11 Repo Installation mysql5.7

Source: Internet
Author: User
Tags gpg

Http://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html

MySQL Yum repo installation instructions

http://dev.mysql.com/downloads/repo/yum/

Download the corresponding version of the EL5 version of

Execute the corresponding version of the command, mine is centos5.11

sudo rpm-uvh mysql57-community-release-el5-7.noarch.rpm

If the display fails, the execution

RPM--import/etc/pki/rpm-gpg/rpm-gpg-key-centos-5

In the execution

sudo rpm-uvh mysql57-community-release-el5-7.noarch.rpm

After success, start the installation

sudo yum install Mysql-community-server

Start Mysql,service mysqld Start

Display failed

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

Perform MySQL initialization

/usr/sbin/mysqld--initialize--user=mysql--datadir=/var/lib/mysql

Service Mysqld Start success!

Find MySQL initial password

grep "Password"/var/log/mysqld.log

Modify mysql5.7 Initial Password

See http://www.cnblogs.com/kxxx/p/5916863.html

Vim/etc/my.conf

Add Skip-grant-tables=1

Restart MySQL Service

Go to MySQL

Update user Set authentication_string = password (' root '), password_expired = ' N ', password_last_changed = Now () where user = ' root ';

Restart Service

centos5.11 Repo Installation mysql5.7

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.