Graphical code tutorial on Linux CentOS MySQL database installation and configuration

黄舟
Release: 2017-06-04 11:23:56
Original
1556 people have browsed it

This article mainly introduces the installation configuration tutorial of Linux CentOS MySQL database in detail. It has certain reference value for those who are interested. You can refer to the notes on installing the mysql database and share it with everyone

a) Download the mysql source installation package

b) Install the mysql source

If Complete! appears at the end, indicating that the MySQL source installation is complete

c) Check whether the installation is complete: yum repo

list

enabled | grep "mysql.*-community.*"

d) Install mysql: yum install mysql-community-server

If Complete! appears at the end, the MySQL installation is complete

e) Set up and start mysql Service: systemctl enable mysqld

f) Check 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 passw

ord

' /var/log/mysqld.log

i) Change MySQL password: mysqladmin -u root -p'old password' password 'new password'

There is a problem with changing the password here, the change fails, this is because of the password Too simple a reason. There are two direct solutions:

Method one:

Make the password more complicated (this is the most direct method)

Method two:

Turn off mysql password strength verification (val

idate_password) Editconfiguration file

:

vim /etc/my.cnf, add this linevalidate_password=off Restart the mysql service after editing: systemctl restart mysqld

j) Set mysql to be accessible remotely:

Log in Enter MySQL: mysql -uroot -p password

Add a user to grant access rights: grant all privileges on *.* to 'root'@'ip address' ident

if

ied by 'password ' with grant option; //You can change the ip to %%, which means opening all

OK. I will try to connect locally.

Okay, it’s over here, I wish everyone no bugs.

The above is the detailed content of Graphical code tutorial on Linux CentOS MySQL database installation and configuration. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template