Execute the following with root privileges.
dnf -y remove mariadb
dnf -y install @mysql:8.0
mysql --version
mysql Ver 8.0.21 for Linux on x86_64 (Source distribution)
vi /etc/my.cnf
Add the following.
[client]
default-character-set = utf8
systemctl enable mysqld.service
systemctl start mysqld.service
mysql_secure_installation
Follow the wizard.
Complete when the following is displayed.
Success.
All done!
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.
mysql -u root -p
Connect with
mysql>
Do the following from.
CREATE DATABASE sample_db CHARACTER SET utf8;
CREATE USER yamato IDENTIFIED BY 'abcd1234';
grant all on *.* to yamato;
Recommended Posts