Upgrading MySQL 5.7 to 8.0 in RHEL/CentOS 7

MySQL 8.0 was released couple day ago. MySQL 8.0 bring some new features and improvement. 
Here are the step to upgrade MySQL 5.7 to 8.0
  • Download the repository and install it
rpm -ivh https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
  •  After that, do upgrade by typing
yum update mysql-community-server --enablerepo=mysql80-community
  • Wait until the update process finish.
  • After that, type this command
mysql_upgrade -u root -p<yourpassword> 
 If you do not do that command, you would face this following error :
The user specified as a definer ('mysql.infoschema'@'localhost') does not exist.
  • Wait until the process finish.
  • Done, your mysql is ready.

PS :
In this version, MySQL change the default authentication type to caching_sha2_password. this type of authentication is not supported yet for common driver like PHP mysqli. So, for the temporary solution, you could change the default authentication type to mysql_native_password. You could change this by typing
sed -i.bak 's/#\sdefault-authentication-plugin/default-authentication-plugin/' /etc/my.cnf
After that, restart your MySQL service with command
systemctl restart mysqld.service

Komentar

Postingan populer dari blog ini

Bagian-Bagian Motherboard(Mainboard) dan Fungsinya

[Termux] Nginx sebagai Load Balancer dan Web Server

[Termux] Install NGINX dan PHP-FPM