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

Tutorial illustration of installing mysql8.0.18 under linux (Centos7)

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

Share

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

1 get the installation resource package mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar

Link: https://pan.baidu.com/s/1hJRNvEdOpoVf4_zNtjRaIA

Extraction code: rsif

2 create a new directory mysql8 under the / usr/local directory

Cd / usr/localmkdir mysql

3 upload the downloaded resource package (mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar) to the usr/local/mysql8 directory and decompress it

Tar-xvf mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar

4 rpm-qa | grep mariadb command to view the installation package of mariadb 5 rpm-e mariadb-libs-5.5.60-1.el7_5.x86_64-- nodeps uninstall mariadb

Rpm-e mariadb-libs-5.5.60-1.el7_5.x86_64-- nodeps

6 install sequentially

Mysql-community-common-8.0.15-1.el7.x86_64.rpm Mysql-community-libs-8.0.18-1.el7.x86_64.rpmmysql-community-client-8.0.18-1.el7.x86_64.rpmmysql-community-server-8.0.18-1.el7.x86_64.rpmrpm-ivh mysql-community-common-8.0.15-1.el7.x86_64.rpmrpm-ivh mysql-community-libs-8.0.18-1.el7.x86_64.rpmrpm-ivh mysql-community-client-8.0 .18-1.el7.x86_64.rpm rpm-ivh mysql-community-server-8.0.18-1.el7.x86_64.rpm

7 View installed resources

Rpm-qa | grep mysql

8 initialization

Mysqld-- initialize initializes chown mysql:mysql / var/lib/mysql-R Authorization systemctl start mysqld enables mysql service systemctl status mysqld to check mysql status cat / var/log/mysqld.log | grep password to view root initial password

10 Log in to mysql using the root user and change the root user password

Mysql-u root-p # enter the previous initial password that is Iv7fjuP,ucH+ (fill in your own password) ALTER USER "root" @ "localhost" IDENTIFIED BY "your own password"; FLUSH PRIVILEGES; # takes effect immediately

Once again, the user root can log in and enter the password he has just changed.

11 remote connection

Use mysql;update user set host ='% 'where user =' root'; ALTER USER 'root'@'%' IDENTIFIED BY' password' PASSWORD EXPIRE NEVER; # change the encryption method ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY' your own password; # update the user password (in this case, root)

Connected successfully

Reference article

Https://www.jb51.net/article/166632.htm

Https://www.jb51.net/article/141578.htm

Summary

The above is the tutorial diagram of installing mysql8.0.18 under linux (Centos7) introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!

If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!

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