Linux CentOS MySQL database installation and configuration tutorial, centos installation and configuration tutorial

Source: Internet
Author: User
Tags yum repolist

Linux CentOS MySQL database installation and configuration tutorial, centos installation and configuration tutorial

Notes on installing the mysql database

A) download the mysql source installation package: wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm

B) install mysql Source: yum localinstall mysql57-community-release-el7-8.noarch.rpm

If the end of a complete appears !, The MySQL source is installed successfully.

C) check whether the installation is complete: yum repolist enabled | grep "mysql. *-community .*"

D) install mysql: yum install mysql-community-server

If the end of a Complete appears !, MySQL installation is complete.

E) set to enable mysql service: systemctl enable mysqld

F) view the installed mysql version: rpm-aq | grep-I mysql

G) Start the MySQL service: systemctl restart mysqld

H) Check the MySQL initial password: grep 'a temporary password'/var/log/mysqld. log

I) change the MySQL password: mysqladmin-u root-p 'old password 'Password' new password'

An error occurred while changing the password. This is because the password is too simple. There are two solutions:

Method 1:Set the password complexity (this is the most direct method)

Method 2:Disable mysql password Strength Verification (validate_password)

Edit the configuration file vim/etc/my. cnf and add the line validate_password = off.

After editing, restart the mysql service: systemctl restart mysqld.

J) set remote access to mysql:

Log on to MySQL: mysql-uroot-p Password

Add a user to grant the access permission: grant all privileges on *. * to 'root' @ 'IP address' identified by 'Password' with grant option; // you can change the ip address to %, indicating that all

OK. Try my local connection.

Well, it's over here. I wish you a different BUG.

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.