As you all know that MySql 8.X will be released soon.
So is Magento 2 compatible with MySQL 8?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Expanding on CedCommerce anwer:
I installed Magento with mysql 8 and it works. The new default caching_sha2_password authentication plugins however introduces a breaking change as detailed in this article:
But you can still use the mysql_native_password authentication plugin with which magento will run. When you create the MySQL user for the Magento database this is the code you have to run:
CREATE USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';
Or if you have an existing user, change the authentication plugin with this line:
ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';
Now, Magento 2.4 officially supports MySQL 8
MySQL 8.0 support. Magento 2.4.x supports MySQL 8.x. (Magento 2.4.0 was tested with MySQL 8.0.20.) Merchants are encouraged to migrate their deployments to MySQL 8.x to take advantage of its improved performance, security, and reliability.
Although MySQL 5.7 is still supported for Magento 2.4.x, MySQL 5.6 is no longer supported. You cannot host Magento 2.4.x with a MySQL 5.6 database. See MySQL.