How to update Docker's MySQL from 5.7 to 8.0. It is assumed that you are using docker compose.
- FROM mysql:5.7 + FROM mysql:8.0
Rewrite the version of
docker / mysql / Dockerfile.
docker-compose build mysql
It will be upgraded by
docker-compose build --no-cache mysql
Please try with.
When you start the mysql container again, the data will be upgraded automatically and you can use it as MySQL 8.0. Please note that once the data has been upgraded, it may not work with older versions of MySQL.
auth plugin has changed from mysql8
Laravel does not support it and the following error occurs.
SQLSTATE[HY000]  The server requested authentication method unknown to the client (SQL: select * from `users` where
Therefore, set the following settings in
default-authentication-plugin = mysql_native_password
I hope you find this helpful.