yum remove mariadb-libs rm -rf /var/lib/mysql/
sudo rpm -ivh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm sudo yum repolist all | grep mysql sudo yum install mysql-community-server sudo systemctl start mysqld.service sudo systemctl enable mysqld.service grep 'temporary password' /var/log/mysqld.log [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: dfsdf****
mysql> show databases; ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'f********'; mysql> show databases;
Laravelを利用する場合は、MySQL8のデフォルトの認証方式(caching_sha2_password)に対応していないため、 認証方式を変更する必要があります。
vim /etc/my.cnf
default-authentication-plugin=mysql_native_password
sudo systemctl restart mysqld