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

How to install mysql5.7 with rpm in centos7

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

How to install mysql 5.7 in centos7 using rpm mode? In response to this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more small partners who want to solve this problem find a simpler and easier way.

1. Download 4 rpm packages

mysql-community-client-5.7.26-1.el7.x86_64.rpmmysql-community-common-5.7.26-1.el7.x86_64.rpmmysql-community-libs-5.7.26-1.el7.x86_64.rpmmysql-community-server-5.7.26-1.el7.x86_64.rpm

First of all, open the mysql official website in your browser.

In the open interface, press keyboard F12 to open Developer Tools, which is as follows:

Find the corresponding version on the official website:

Click to download directly:

You can find the download path in Developer Tools:

The following gives the path of 4 rpm packages of myql5.7. You can download them directly by opening Thunder and filling in the download path. Other versions can be downloaded in the same way:

https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-community-server-5.7.26-1.el7.x86_64.rpm

https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-community-client-5.7.26-1.el7.x86_64.rpm

https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-community-common-5.7.26-1.el7.x86_64.rpm

https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-community-libs-5.7.26-1.el7.x86_64.rpm

2. Upload rpm to linux

I use xshell here, xftp is not installed

Enter put command in sftp and select downloaded rpm package to upload:

3. installation

The uploaded rpm is as follows:

Install via rpm -ivhmysql-community-***-5.7.26-1.el7.x86_64.rpm--force --nodeps, *** for community, libs, client, server

Installation order common-->libs-->client-->server

If there is no--force --nodeps, an alert will appear:

warning: mysql-community-common-5.7.26-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

4. configured

Start mysql service:

[root@localhost ~]# service mysqld startRedirecting to /bin/systemctl start mysqld.service[root@localhost ~]#

Find the initial password:

[root@localhost ~]# cat /var/log/mysqld.log |grep password2019-06-02T08:39:38.448115Z 1 [Note] A temporary password is generated for root@localhost: dLZMCRv? s2q)2019-06-02T08:40:41.870130Z 2 [Note] Access denied for user 'root'@'localhost' (using password: NO)

Log in to mysql:

[root@localhost ~]# mysql -u root -p

Password for dLZMCRv found above? s2q)

Change root password:

mysql> alter user 'root'@'localhost' identified by 'newpasswd';

Allow remote connections:

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'newpasswd' WITH GRANT OPTION;mysql> FLUSH PEIVLEGES;

Close the firewall:

[root@localhost ~]# systemctl stop firewalld.service

About how to install mysql5.7 in centos7 using rpm mode The answer to the question is shared here. I hope the above content can be of some help to everyone. If you still have a lot of doubts, you can pay attention to the industry information channel for more relevant knowledge.

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

Servers

Wechat

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

12
Report