Steps to install MySQL 8 on CentOS 8

Thing you want to do

Installation

Execute the following with root privileges.

dnf -y remove mariadb
dnf -y install @mysql:8.0

Version confirmation

mysql --version
mysql  Ver 8.0.21 for Linux on x86_64 (Source distribution)

Configuration

vi /etc/my.cnf

Add the following.

[client]
default-character-set = utf8

Start-up

systemctl enable mysqld.service
systemctl start mysqld.service

password setting

mysql_secure_installation

Follow the wizard.

Complete when the following is displayed.

Success.

All done!

Connection confirmation

mysql -u root -p

Make sure you can connect with the password you set earlier.

Connection is OK when the following is displayed.

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.21 Source distribution

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

When exiting

mysql> exit

Enter.

Create any database and user

mysql -u root -p

Connect with

mysql>

Do the following from.

Create a new database named sample_db.

CREATE DATABASE sample_db CHARACTER SET utf8;

Create a new user yamato. The password is set to her abcd1234.

CREATE USER yamato IDENTIFIED BY 'abcd1234';

Allow yamato full access to the database.

grant all on *.* to yamato;

Recommended Posts

Steps to install MySQL 8 on CentOS 8
Steps to install devtoolset-6 on CentOS 7
Upgrade from MYSQL5.7 to 8.0 on CentOS 6.7
Install MySQL 5.6 on CentOS6 [How to specify the version]
How to install beta php8.0 on CentOS8
Install Golang on CentOS 8
Install Neo4j 4.1.3 on centOS
Install Vertica 10.0 on CentOS 6.10
Install PostgreSQL 12 on Centos8
Install Python 3 on CentOS 7
Install kuromoji on CentOS7
Install Mattermost on CentOS 7
Install PostGIS 2.5.5 on CentOS7
Install jpndistrict on CentOS 7
How to install MySQL
Install Redmine 4.1.1 on CentOS 7
Smokeping Install on CentOS7
Install PostgreSQL 13 on CentOS 7.5
Steps to install samba on CentOS 8 and connect from Windows 10 Explorer
Command to install nginx / PHP7 / php-fpm on CentOS7
Install OpenFOAM v2006 on CentOS
Install Jenkins on Docker's CentOS
Install Ruby 2.7 on CentOS 7 (SCL)
Steps to set up Postfix and Dovecot on CentOS 8.3
Steps to set up a VNC server on CentOS 8.3
Try DPDK20 SDK on CentOS7 â‘ Install
Rails new fails to install mysql
How to deploy Laravel on CentOS 7
Steps to run docker on Mac
How to install ImageMagick on Windows 10
Install Ruby 2.5 on CentOS 7 using SCL
Install Java Open JDK 8 on CentOS 7
mysql2 fails to install with bundle install
How to install WildFly on Ubuntu 18.04
How to install GNOME as a desktop environment on CentOS 7
Install Java 9 on windows 10 and CentOS 7
Steps to install Maven on Mac and use it in Eclipse
Install PHP7.4 to build CentOS7 Laravel environment
Install samba4 from source code on CentOS8
How to install production Metabase on Ubuntu
I want to install PHP 7.2 on Ubuntu 20.04.
Install the webmail client Rainloop on CentOS 8
Install CentOS 7 on Raspberry pi 4 Model B
I tried to build AdoptOpenjdk 11 on CentOS 7
How to install kafkacat on Amazon Linux2
Steps to register Java files on GitHub
Install MariaDB (CentOS 8)
[CentOS] Install apache-loggen
Install NextCloud on CentOS 7 with Alibaba Cloud ECS
How to install network drivers on standalone Ubuntu
Procedure to change lower_case_table_names = 1 in MySQL 8.0 of CentOS 8.3
How to install NVIDIA driver on Ubuntu 18.04 (Note)
Install GitLab on CentOS 8 with no internet connection
Note how to rollback Mysql deployed on Heroku
How to install multiple JDKs on Ubuntu 18.04 LTS
[Rails MySQL] How to reset DB on heroku
[Java] 4 steps to implement splash screen on Android
Install CMS Made Simple v2.2.2 on LAMP on CentOS 7.3
Reference articles and books used to install CentOS
[Ruby on Rails] How to install Bootstrap in Rails
Install gradle on mac