The first figure


preface

About the blogger:

— I am Xiaoqi, a Java programmer who likes reading, making friends and sharing technology. I prefer to sort out and share some Java interview questions. If you need to pay attention to “Xiaoqi Java Interview” to get information.


The article directories

The first figure

preface

The article directories

Centos7 Quickly install Mysql

Centos7 Install Mysql in detail

Uninstall Mysql

Centos7 Quickly install Mysql

If you want to quickly install just follow my command, don’t need to look at the screenshots later, first find a folder where you want to install, this time can start.

1, wget – I – c dev.mysql.com/get/mysql57…

2, yum -y install mysql57-community-release-el7-10.noarch. RPM

3, yum -y install mysql-community-server

4. Systemctl start mysqld.service

5, grep “password” /var/log/mysqld.log (note: check the default password)

Mysql -uroot -p mysql -uroot -p mysql -uroot -p

Set global validATE_password_policy =0;

Set global validATE_password_length =1;

9, ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘your new password ‘; (Note: Change your new password here)

Now that you’ve downloaded, installed, started, and changed your password, you just need to configure it

Centos7 Install Mysql in detail

1, wget – I – c dev.mysql.com/get/mysql57…

2, yum -y install mysql57-community-release-el7-10.noarch. RPM

3, yum -y install mysql-community-server

4. Systemctl start mysqld.service

5, grep “password” /var/log/mysqld.log (note: check the default password)

Mysql -uroot -p mysql -uroot -p mysql -uroot -p

Set global validATE_password_policy =0;

Set global validATE_password_length =1;

9, ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘your new password ‘; (Note: Change your new password here)

10, show the databases;

After we change the password, we have the authority to operate the database. At this time, let’s verify whether we can view the database.

Uninstall Mysql

1, the RPM – qa | grep -i mysql

Start by looking at what files mysql has

2, yum remove file name

Find / -name mysql

Find the mysql configuration file and database

Rm -rf /var/lib/mysql

Rm -rf /usr/share/mysql

6, rm – rf/etc/selinux/targeted/active/modules / 100 / mysql

These are some configuration files and database, if you do not need to delete the library please do not perform.