Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The process of MySQL5.7.18 yum mode from uninstallation to installation under Linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article is to share with you about the process of MySQL5.7.18 yum under Linux from uninstallation to installation. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Each step has referred to a lot of articles, which will be listed one by one later, because this machine has already been installed, just uninstall it step by step and then reinstall it.

This article is realized through a series of relatively fake ways, which is relatively easy to understand and accept for users 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 wget commands, directly through the editing function of winscp editor, rather than vim commands.

Unloading

Operating system version

Rpm-qa | grep-i mysql rpm-qa | grep-I mysql command to view the components that have been installed.

Use the yum-y remove command to uninstall the installed MySQL components, and use the following command to uninstall the previously installed components

Yum-y remove mysql-community-libs-5.7.18-1.el7.x86_64yum-y remove mysql-community-common-5.7.18-1.el7.x86_64yum-y remove mysql-community-client-5.7.18-1.el7.x86_64yum-y remove mysql57-community-release-el7-10.noarchyum-y remove mysql-community-server-5.7.18-1.el7.x86_64

Many pictures will not be truncated, truncate an example.

Use rpm-qa | grep-I mysql again to view the installed components, which have been completely uninstalled.

Install the generated directory before whereis mysql query and remove it respectively.

Installation

Download the repo source for MySQL. As for what this file is for, it is understood that it will automatically help you configure the yum source of the MySQL installation component.

This file can be downloaded under Windows, then uploaded to the linux server, or downloaded directly from the linux server. It 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 repo package for MySQL

Rpm-ivh mysql57-community-release-el7-10.noarch.rpm

There will be some simple prompts in the middle, after entering Y, everything is automatically installed.

Yum install mysql-community-server

Installation completed

Modify Root initial password

After installation, a my.cnf file is generated under etc, and a skip-grant-tables = 1 configuration is added to my.cnf, skipping the initialization password verification requirement.

Systemctl starts the mysql service

Connect to the MySQL service. Because you have configured to skip the password requirement, enter mysql-u-p and press enter. When prompted to enter the password, you can enter and enter to connect to the mysql.

Modify the Root password of MySQL

Update user set authentication_string=PASSWORD ('newpassword') where User='root'

Use this statement to modify the remote access of root users, update user set host ='% 'where user =' root'

After reboot, you can log in and connect to MySQL with a prefabricated password

The whole process is relatively simple, if you are familiar with it, it will only take a few minutes.

Thank you for reading! On the "Linux MySQL5.7.18 yum mode from uninstall to installation process" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to see it!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report