MySQL 8.0.13 installation and configuration tutorial under CentOS7.3

MySQL 8.0.13 installation and configuration tutorial under CentOS7.3

1. 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

2. Install MySQL

1. Uninstall mariadb database

rpm -qa | grep mariadb
yum -y remove mariadb-libs-5.5.52-1.el7.x86_64

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

yum -y install openssl-devel perl-JSON

3. Unzip and install MySQL

tar -xvf mysql-8.0.13-1.el7.x86_64.rpm-bundle.tar

rpm -ivh mysql-community-*.rpm

4. Modify the configuration file

vim /etc/my.cnf

default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8
max_allowed_packet = 100M

5. Initialize the database and start

mysqld --initialize
chown mysql:mysql /var/lib/mysql -R
systemctl start mysqld
systemctl enable mysqld

6. View the temporary password and modify the MySQL password using the temporary password

cat /var/log/mysqld.log | grep password

mysqladmin -uroot -pbga/.tkZw4q! password Test1212!

7. Grant remote user permissions

mysql -u root -p

create user 'root'@'%' identified with mysql_native_password by 'Test1212!';

grant all privileges on *.* to 'root'@'%' with grant option;

flush privileges;

8. Modify the password when logging in to localhost to prevent local login failure

mysql -uroot -p -h 192.168.0.101

ALTER USER 'root'@'localhost' IDENTIFIED BY 'Test1212!';

flush privileges;

9. Modify encryption rules

The encryption rules of MySql 8.0 and 5.0 are different, and the current visualization tool only supports the old encryption method. If it is not modified, the visualization tool may not be able to open the database.

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

flush privileges;

Wonderful topic sharing:

MySQL different versions installation tutorial

MySQL 5.7 installation tutorials for various versions

MySQL 5.6 installation tutorials for various versions

mysql8.0 installation tutorials for various versions

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • MySQL 8.0.15 installation and configuration method graphic tutorial under Windows
  • MySQL 8.0.14 installation and configuration method graphic tutorial
  • The data folder failed to be created automatically during the installation of mysql8.0.14.zip. The service cannot be started.
  • MySQL 8.0.14 installation and configuration method graphic tutorial (general)
  • MySQL 8.0.13 installation and configuration method graphic tutorial
  • MySQL 8.0.13 decompression version installation and configuration method graphic tutorial
  • MySQL 8.0.13 installation and configuration method graphic tutorial under win10
  • MySQL 8.0.13 installation and configuration method graphic tutorial under Windows 64 bit
  • Detailed tutorial on installing mysql-8.0.13 (zip installation) on windows 10 system
  • MySQL 8.0.15 winx64 decompression version installation and configuration method graphic tutorial

<<:  CentOS 7.6 installation of MySQL 5.7 GA version tutorial diagram

>>:  Vue implements click feedback instructions for water ripple effect

Recommend

CSS multi-column layout solution

1. Fixed width + adaptive Expected effect: fixed ...

MySQL sql_mode analysis and setting explanation

When inserting a set of data into the MySQL datab...

Pure CSS implementation of radio and checkbox effect example

radio-and-checkbox Pure CSS to achieve radio and ...

How to set up scheduled tasks in Linux and Windows

Table of contents Linux 1. Basic use of crontab 2...

Pull-down refresh and pull-up loading components based on Vue encapsulation

Based on Vue and native javascript encapsulation,...

How to install babel using npm in vscode

Preface The previous article introduced the insta...

Vue+Bootstrap realizes a simple student management system

I used vue and bootstrap to make a relatively sim...

About Tomcat combined with Atomikos to implement JTA

Recently, the project switched the environment an...

Understand the principle of page replacement algorithm through code examples

Page replacement algorithm: The essence is to mak...

Solution to the lack of my.ini file in MySQL 5.7

What is my.ini? my.ini is the configuration file ...

HTML 5.1 learning: 14 new features and application examples

Preface As we all know, HTML5 belongs to the Worl...

A brief discussion on the magic of parseInt() in JavaScript

cause The reason for writing this blog is that I ...