How to install MySQL 5.7.22 in the Redhat 7.0 system

Source: Internet
Author: User
Tags mysql in tar extract



How to install MySQL 5.7.22 in the Redhat 7.0 system



Today to introduce you how to install mysql5.7, before the installation, the first thing to see is that your system has been installed in the case. Type Rpm-qa|grep MySQL, if nothing appears, indicates that no related components have been installed, and if so, type Rpm-e--nodeps ************** (The asterisk is the name of the file you want to delete) according to the name displayed. Then type Rpm-qa|grep mariadb, the same steps, to delete the file that appears. Once you have completed both steps, you can start downloading the required packages.


    • Download the required version:


MySQL official website:https://dev.mysql.com/



Enter Downloads=>mysql Community server=>mysql Community Server 5.7



Choose from the following:





Download: Mysql-5.7.22-1.el7.x86_64.rpm-bundle.tar



Type: wget Https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.22-1.el7.x86_64.rpm-bundle.tar


    • Move the installation package to/home/mysql in root mode


Type cd ... Move to home directory



Type mkdir mysql to create MySQL directory



After you move a file into the directory you just created



type TAR-XVF Mysql-5.7.22-1.el7.x86_64.rpm-bundle.tar Extract File


  • Install in sequence, cannot change Order, Because there are dependencies
  • rpm-ivh mysql-community-common-5.7.22-1.el7.x86_64.rpm

    rpm-ivh mysql-community-libs-5.7.22-1.el7.x86_64.rpm

    rpm-ivh mysql-community-client-5.7.22-1.el7.x86_64.rpm

    rpm-ivh mysql-community-server-5.7.22-1.el7.x86_64.rpm


  • Configure the password for MySQL


You can't get in without a password. After the installation, there will be a random password to provide you, here directly to teach you how to modify the password you want, one step. Under Root, type vi/etc/my.cnf, add skip-grant-tables to the last line of the text, and save the exit so you can skip entering the password.



Restart Services: Service mysqld restart



Login Mysql:mysql-u Root-p



Direct confirmation without password to login



Type:UPDATE mysql.user SET authentication_string = PASSWORD (' Sumroot123456.. ') WHERE user= ' root ' and host= ' localhost '; PASSWORD ("), the quotation mark instead of the password you want, note the version of the required password format, which is designed to uppercase + lowercase + number + punctuation format, the password is too simple will be error.



Type:flush privileges; Refresh Permissions



Type: Exit to quit MySQL



vi/etc/my.cnf Again, delete the statement you just added, then restart the service, and change the password to complete.



MySQL installation to this end



How to install MySQL 5.7.22 in the Redhat 7.0 system


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.