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

Analyzing the process of downloading YUM and installing mysql

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the download YUM installation mysql process analysis, the content of the article is carefully selected and edited by the author, with a certain pertinence, for everyone's reference significance is still relatively great, the following with the author to understand the next topic content.

1. Download YUM repository files

# wget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm

2. Install the YUM Repo file

# yum localinstall mysql80-community-release-el7-1.noarch.rpm

3. Select a specific version

5.5 5.6 5.7 8.0

/ / View YUM Warehouse list of all warehouses on MySQL

# yum repolist all | grep mysql

/ / View only enabled

# yum repolist enabled | grep mysql

/ / install the YUM Administration Toolkit, which provides yum-config-manager command tools

# yum install yum-utils

/ / disable 8.0

# yum-config-manager-disable mysql80-community

/ / enable 5.5

# yum-config-manager-enable mysql55-community

Reconfirm the enabled MySQL warehouse

# yum repolist enabled | grep mysql

4. Start installing MySQL

# yum install-y mysql-community-server

5. Manage MySQL services

/ / start

# systemctl start mysqld.service

/ / View status

# systemctl status mysqld.service

/ / Boot self-boot

# systemctl enable mysqld.server

/ / View listening port. Default is 3306.

# ss-natl | grep 3306

6. Open mysql

# mysql

7. Change the password of the root user

Method 1: use the SET PASSWORD command

Log in to MySQL first.

Format: mysql > set password for username @ localhost = password ('new password')

Example: mysql > set password for root@localhost = password ('123')

Method 2: use mysqladmin

Format: mysqladmin-u username-p old password password new password

Example: mysqladmin-uroot-p123456 password 123

Method 3: edit the user table directly with UPDATE

Log in to MySQL first.

Mysql > use mysql

Mysql > update user set password=password ('123') where user='root' and host='localhost'

Mysql > flush privileges

8. The solution that Mysql can not connect remotely in CENTOS7

(1) Log in to MySQL on the machine with MySQL installed. Mysql-u root-p password

(2) execute use mysql

(3) an error may be reported after executing the sentence update user set host ='% 'where user =' root';, regardless of it.

(4) execute FLUSH PRIVILEGES

After reading the above about download YUM installation mysql process analysis, many readers must have some understanding, if you need to get more industry knowledge and information, you can continue to follow our industry information column.

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