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 MySQL8.0.19 in Linux system

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

Share

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

This article shows you how to install MySQL8.0.19 in the Linux system, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.

I. introduction of the environment

Quick installation and configuration of MySQL.

1. Operating system: CentOS7_x64

2. Database version: MySQL-8.0.19

Second, install MySQL-8.0.19

Decompress the MySQL file to get the following list of rpm files:

The following rpm packages need to be installed sequentially:

Mysql-community-common-8.0.19-1.el7.x86_64.rpmmysql-community-libs-8.0.19-1.el7.x86_64.rpmmysql-community-client-8.0.19-1.el7.x86_64.rpmmysql-community-server-8.0.19-1.el7.x86_64.rpm installation command: rpm-ivh rpm package name

Note: before installing the mysql-community-libs package, you need to uninstall the mariadb-libs package that comes with Linux, otherwise the installation will fail:

Rpm-qa | grep mariadb-libs*rpm-e-- nodeps mariadb-libs*

After the installation is complete, launch MySQL and log in to verify that the installation is successful:

Systemctl start mysqldcat / var/log/mysqld.log | grep passwordmysql-uroot-penter password: III. Configure MySQL

1. The initial password of MySQL is complex and difficult to remember. It needs to be modified after logging in for the first time:

ALTER USER 'root'@'localhost' IDENTIFIED BY' password'

2. Develop MySQL connection permissions to make them accessible by remote connection tools:

UPDATE mysql.user SET `Host` ='% 'WHERE User='root';flush privileges

If you do not have open connection permission, the following error will be reported when using clients such as navicat to connect to the database:

3. Restore the password verification plug-in, and change the password authentication plug-in of MySQL8 from caching_sha2_password to mysql_native_password:

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY' passowrd'

If the plug-in is not replaced, the following error will be reported when connecting:

4. The firewall releases port 3306 and sets MySQL to boot automatically:

Firewall-cmd-- zone=public-- add-port=3306/tcp-- permanentsystemctl enable mysqld the above is how to install MySQL8.0.19 in a Linux system. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

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