MySQL Installation documentation (Linux official Yum version)

Source: Internet
Author: User

MySQL Installation documentation (official yum install Linx version)

creation time:2016-12-20

Document Purpose

in the install mysql server application under Linux.

(Note: This document installs the MySQL application using the Yum Library installation , this article assumes that you do not have a third-party released rpm package installed on your system , if you have installed third-party rpm package, please refer to the article "replace third party publishing MySQL" content)

System Environment

operating system:CentOS 7 (3.10.0-229.el7.x86_64)

MySQL version:mysql57-community-release-el7-9.noarch.rpm

Red Hat Enterprise linux 7/oracle Linux 7 (Architecture Independent), RPM package

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

Operation Steps 1. Download the MySQL repo source

Download the RPM package from the following URL (this is the package name mysql57-community-release-el7-9.noarch.rpm)

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

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8C/93/wKioL1hwjQ-TxZynAAAZQpjQvek781.png "title=" Picture 1.png "alt=" Wkiol1hwjq-txzynaaazqpjqvek781.png "/>

Note: Choose different RPM packages according to your own system

2. Installing RPM Packages

sudo yum localinstall mysql57-community-release-el7-9.noarch.rpm-y

Note: If there is an error "rpm packet Conflict", please use rpm-e First uninstall the original rpm package, and then install

3. Ann install mysql

sudo yum install mysql-community-server-y

Note: If you want to install 5.6 instead of 5.7, you need to execute the following statement to disable 5.7 Installation:

sudo yum-config-manager--disable mysql57-community

sudo yum-config-manager--enable mysql56-community

4. turn on MySQL

sudo service mysqld start

sudo service mysqld status

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8C/97/wKiom1hwjS-RwuxEAABAkdhz6iE996.png "title=" Picture 2.png "alt=" Wkiom1hwjs-rwuxeaabakdhz6ie996.png "/>

5. Initialize Configuration

After starting MySQL, the program will initialize its own configuration, which will build a root account, with a temporary password, to obtain a temporary password, just enter the following command:

sudo grep ' temporary password '/var/log/mysqld.log

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8C/97/wKiom1hwjUiRM5k6AAATWRZDIkM356.png "title=" Picture 3.png "alt=" Wkiom1hwjuirm5k6aaatwrzdikm356.png "/>

Enter a temporary password, enter mysql, change the password

Mysql-uroot-p

ALTER USER ' root ' @ ' localhost ' identified by ' mynewpass4! ';

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8C/93/wKioL1hwjWOzdYMsAAA59-HEr8Q433.png "title=" Picture 4.png "alt=" Wkiol1hwjwozdymsaaa59-her8q433.png "/>

Note: This version of MySQL password Authentication plugin is turned on by default, the password entered must meet at least one uppercase, a lowercase, a number, a special character, at least 8 digits, otherwise it will be an error.

Reference Documents

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


This article is from the "11591346" blog, please be sure to keep this source http://11601346.blog.51cto.com/11591346/1889988

MySQL Installation documentation (Linux official Yum version)

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.