Installation and configuration of MySQL under Centos 7

Source: Internet
Author: User

Preparatory work:

Install the Yum library and will download a good mysql5.7.16 installation package under the textile/opt directory

One, the mysql5.7.16 5 program files to install (so as not to solve the centos7 of the MARIADB database dependencies)

Yum Install-y/opt/mysql*


Second, restart the MySQL service

#systemctl Restart Mysqld.service

Third, find a temporary password for the MySQL service

Find a temporary password is generated for [email protected]:?????

Copy the temporary password down

Iv. entering MySQL

#mysql-u root-p   Enter password:n:u=eek,l2_k
Alter user ' root ' @ ' localhost ' identified by ' [email protected] '; Reset your password, or you cannot create a user
show databases; View the database;
Create user ' aa01 ' @ ' 192.168.100.134 ' identified by ' [email protected] '; Create a user for 192.168.100.134, that is, the user created can only log on 192.168.100.134
Create Database Kong; Create a Kong database
Grant all privileges the xyq.* to ' aa01 ' @ ' 192.168.100.140 '; Give a user the right to specify a database, * represent all tables

V. Completion

————————————————————————————————————————————

mysql_install_db--datadir=/var/lib/mysql//Initialize Database

RPM package installed, can be seen with RPM-QA, if you want to find out if a package is installed, with Rpm-qa | grep "Software or package name"

Yum method installed, can be found with Yum list installed, if it is to find the specified package, with Yum list installed | grep "software name or package name"

Installation and configuration of MySQL under Centos 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.