After a lot of trouble, I finally figured out the yum installation process. I wrote about binary package installation before. Here I use yum installation. The environment is the same, Centos7.2+MySQL5.7.18. I referred to a lot of articles for each step, which will be listed one by one later. Since the machine has already been installed, I simply uninstalled it step by step and then reinstalled it. This article uses a series of relatively copycat methods to achieve this, which is relatively easy to understand and accept for users like me who have not been in contact with Linux for a long time, such as directly downloading files under Windows and dragging them to the Linux system instead of downloading with the wget command, and directly using the editing function of the winscp editor instead of editing with the vim command. uninstall Operating system version rpm -qa | grep -i mysql Run the rpm -qa | grep -i mysql command to view the installed components. Use the yum -y remove command to uninstall the installed MySQL components. Use the following command to uninstall the components installed above. yum -y remove mysql-community-libs-5.7.18-1.el7.x86_64 yum -y remove mysql-community-common-5.7.18-1.el7.x86_64 yum -y remove mysql-community-client-5.7.18-1.el7.x86_64 yum -y remove mysql57-community-release-el7-10.noarch yum -y remove mysql-community-server-5.7.18-1.el7.x86_64 I won’t take more pictures, just one as an example. Use rpm -qa | grep -i mysql again to view the installed components, which have been completely uninstalled. whereis mysql queries the directories generated by the previous installation and removes them one by one. Install Download the MySQL repo source. As for what this file is used for, my personal understanding is that it automatically helps you configure the yum source of the MySQL installation component. This file can be downloaded under Windows and then uploaded to the Linux server, or it can be downloaded directly on the Linux server and also needs to be installed. After downloading this file, drag it to the root directory of the Linux server through winscp The files downloaded above under Linux Install the MySQL repo package rpm -ivh mysql57-community-release-el7-10.noarch.rpm There will be some simple prompts in the middle. After entering Y, everything will be installed automatically. yum install mysql-community-server Installation Complete Change the initial root password After installation, a my.cnf file will be generated under etc. Add a skip-grant-tables = 1 configuration in my.cnf to skip the initialization password verification requirement. systemctl start mysql service Connect to the MySQL service. Since the password requirement is skipped, enter mysql -u -p and press Enter. When prompted to enter the password, continue to press Enter to connect to MySQL. Change MySQL Root Password update user set authentication_string=PASSWORD('newpassword') where User='root'; Use this statement to modify the root user to have remote access, update user set host = '%' where user = 'root' After restarting, you can log in and connect to MySQL using the pre-set password The whole process is relatively simple. If you are familiar with it, it will only take a few minutes. It doesn't take long to go through this process. It's just that I'm not familiar with it. I try it out while groping. If someone can guide me or I try it out more, it will be much easier. You may also be interested in:
|
<<: A simple way to restart QT application in embedded Linux (based on QT4.8 qws)
>>: Vue project realizes paging effect
The basic principle of all animations is to displ...
Sometimes, we need to copy a whole column of data...
Yesterday I installed CentOS7 under VMware. I wan...
Use CSS styles and HTML tag elements In order to ...
I'll record the problems I encountered during...
1. Use frameset, frame and iframe to realize mult...
There are two ways to create a primary key: creat...
Recently, I have done a simple study on the data ...
CentOS 6 and earlier versions provide MySQL serve...
Table of contents 1. v-for: traverse array conten...
This article shares a native JS implementation of...
This article example shares the specific code of ...
Preface In front-end programming, we often use th...
This article shares the specific code of Vue to i...
Table of contents 1. Basic Concepts of GTID 2. GT...