Red Hat 7.2 rpm install MySQL 5.7.12

Source: Internet
Author: User

Install Red Hat 7.2 Development Pack Java package all installed

Download MySQL 5.7.12

wget Http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.12-1.el7.x86_64.rpm-bundle.tar

See if MySQL is installed

Rpm-qa | grep MySQL

Uninstall MySQL
Rpm-e–nodeps

Unzip MySQL
TAR-XVF Mysql-5.7.12-1.el7.x86_64.rpm-bundle.tar

Install MySQL
Yum Install mysql-community-{client,common,libs}-*

RPM-IVH mysql-community-server-5.7.12-1.el7.x86_64.rpm

Start the MySQL service

Start with the usual boot method service mysqld start

Z is using the latest Start method Systemctl start Mysqld.service

View the status of the MySQL server

sudo service mysqld status

Generate Random passwords
grep ' temporary password '/var/log/mysqld.log
2016-04-30t11:25:13.632616z 1 [Note] A temporary password is generated for [email protected]: X9. L=p4iylzd


Configure random passwords
Mysql-uroot-p
X9. L=p4iylzd

ALTER USER ' root ' @ ' localhost ' identified by ' hanzheng.123 ';

The field stored in password 5.7 is no longer password, it becomes authentication_string

Update Mysql.user set Authentication_string=password (' root ') where user= ' root ';

If you change the root password, you will need to reset the root password if you log in to the MySQL system for the first time using the root user.

SET password=password (' root ');



Re-Login
Mysql-uroot-p
Hanzheng.123

Red Hat 7.2 rpm install MySQL 5.7.12

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.