CentOS8 install MySQL8.0

Install MySQL8.0#

Install MySQL using the latest package manager

Copy

sudo dnf install@mysql

Turn on boot#

After the installation is complete, run the following command to start the MySQL service and make it start automatically at startup:

Copy

sudo systemctl enable --now mysqld

To check whether the MySQL server is running, enter:

Copy

sudo systemctl status mysqld

Add password and security settings#

Run the mysql_secure_installation script, which performs some security-related operations and sets the MySQL root password:

Copy

sudo mysql_secure_installation

Proceed as follows:

  1. You are required to configure the VALIDATE PASSWORD component: Enter y and press Enter to enter the configuration

  1. Remove the test database? Type y and press enter
  2. Reload the permission table? Type y and press enter

Remote login#

If you need to set up root account remote login, mysql statement:

Copy

use mysql; update``user``set host='%'``where``user='root'; flush``privileges;

Firewall settings#

After the setting is complete, open the system's 3306 port:

Copy

sudo firewall-cmd --add-port=3306/tcp --permanent sudo firewall-cmd --reload

Close MySQL host query dns#

MySQL will reversely resolve the dns record of the remote connection address. If the MySQL host cannot connect to the external network, the dns may not be resolved successfully, resulting in a slow connection to MySQL for the first time, so this function can be turned off in the configuration.
Reference Document
Open the /etc/my.cnf file and add the following configuration:

Copy

[ mysqld]``skip-name-resolve

Restart service#

Copy

sudo systemctl restart mysqld

After the test and installation of this machine, MySQL8.0 is already utf8mb4 character set by default, so the character set will not be modified

Recommended Posts

CentOS7.2 install Mysql5.7.13
CentOS7 install MySQL
CentOS install mysql
CentOS7 install mysql
CentOS 7 install MySQL 5.6
CentOS8 install MySQL8.0
CentOS7 install mysql8
CentOS7 install MySQL8
centos 7.5 install mysql5.7.17
CentOS6.5 offline install MySQL5.6.26
Install MySQL5.7 in centos7
Install mysql5.7 under CentOS7
CentOS 7.2 Yum install MySQL 5.6
Centos7 install Mysql8 tutorial
Centos manually install mysql8
Install mysql under Centos 7
Centos7 install Mysql database
Install mysql5.1 under CentOS6.5
1.5 Install Centos7
Install mysql online on centos
centos install mysql through yum
Install MySQL 8.0.16 on Linux Centos
Install MySQL under Linux (CentOS 7)
Centos6 install mysql 5.7.x series
CentOS8 install MySQL8 (pro test)
How to install MySQL on CentOS 8
Centos7.3 install nginx
CentOS Yum compile and install MySQL 5.6
CentOS install Redmine
Centos7 install protobuf
CentOS 7 install Docker
CentOS 7 install Nginx, PHP, MySQL packages
CentOS7 install GlusterFS
CentOS 7.4 install Zabbix 3.4
CentOS7 install Docker
Centos6.5 install Tomcat
Vmware install CentOS6
CentOS 7 install Hadoop 3.0.0
Install MySql with Docker in CentOS7
Centos7 install Python2.7
Centos 7.6 install seleniu
CentOS 7.3 install Zabbix3
Centos7 install LAMP+PHPmyadmin
Install MySQL on Linux CentOS7 (Windows)
CentOS install openjdk 1.8
CENTOS6.5 install CDH5.12.1 (1)
CentOS install PHP
CentOS7 yum install and start mysql
CentOS6 install mist.io
Centos7 install Docker
Centos7 and centos8 install mysql5.6 5.7 8.0 so simple
Centos yum install mysql5.6 or above
centOs install rabbitMQ
Centos7 install Nginx
CentOS6.5 install CDH5.13
Centos7 install docker18
centos7 install docker
CentOS install jdk
centos7 install nginx-rtmp
Centos6.3 install KVM
CentOS install PostgreSQL 9.1