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

Graphic and text tutorial of mysql 8.0.13 installation and configuration method under CentOS7.3

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

Share

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

I. basic environment

1. Operating system: CentOS 7.3

2. MySQL:8.0.13 link: https://pan.baidu.com/s/13-j_umr7eEnKFaugw4YTqQ extraction code: 62yt

Second, install MySQL

1. Uninstall the mariadb database

Rpm-qa | grep mariadbyum-y remove mariadb-libs-5.5.52-1.el7.x86_64

2. Installation-related dependencies (this article uses CentOS 7.3image as the local offline yum source)

Yum-y install openssl-devel perl-JSON

3. Decompress and install MySQL

Tar-xvf mysql-8.0.13-1.el7.x86_64.rpm-bundle.tarrpm-ivh mysql-community-*.rpm

4. Modify the configuration file

Vim / etc/my.cnfdefault-storage-engine = innodbinnodb_file_per_tablecollation-server = utf8_general_ciinit-connect = 'SET NAMES utf8'character-set-server = utf8max_allowed_packet = 100m

5. Initialize the database and start

Mysqld-- initializechown mysql:mysql / var/lib/mysql-Rsystemctl start mysqldsystemctl enable mysqld

6. Check the temporary password and change the MySQL password through the temporary password

Cat / var/log/mysqld.log | grep passwordmysqladmin-uroot-pbga/.tkZw4q! Password Test1212!

7. Assign remote user permissions

Mysql-u root-pcreate user 'root'@'%' identified with mysql_native_password by' Test1212 grant all privileges on *. * to 'root'@'%' with grant option;flush privileges

8. Modify the password of localhost login to prevent local login failure.

Mysql-uroot-p-h 192.168.0.101ALTER USER 'root'@'localhost' IDENTIFIED BY' Test1212 flush privileges

9. Modify encryption rules

The encryption rules of MySql8.0 version are different from those of 5.0, but the current visualization tools only support the old encryption methods. If you do not modify them, the visualization tools may not be able to open the database.

ALTER USER 'root'@'localhost' IDENTIFIED BY' root' PASSWORD EXPIRE NEVER;flush privileges

Wonderful topic sharing:

Installation tutorials for different versions of mysql

Installation tutorials for each version of mysql5.7

Installation tutorials for each version of mysql5.6

Installation tutorials for each version of mysql8.0

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support 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