I am using Google Kubernetes Engine (GKE) to deploy MySQL. Recently, I upgraded to mysql:latest
image, which now points to MySQL 9.0. Since MySQL 9.0 completely removed the mysql_native_password authentication plugin, I can no longer connect to the MySQL console, nor can I update my root account to caching_sha2_password
.
Here is the problem I’m facing:
- Error on Login: When I try to log in, I get the error: Plugin ‘mysql_native_password’ is not loaded.
- ConfigMap Attempts: I tried using a ConfigMap to add default_authentication_plugin=caching_sha2_password or mysql_native_password=ON, but the pod crashes with errors stating either unknown variable ‘default_authentication_plugin=caching_sha2_password’ or ‘mysql_native_password’ is not found.
- Cannot Back Up Data: Since I can’t log in to my root account, I’m unable to back up my data.
- Downgrade Issues: I attempted to downgrade MySQL to the LTS version (8.x), but encountered errors indicating that MySQL cannot downgrade from 9.0 to 8.x.
- Initial Deployment:
- Used
mysql:latest
image which resulted in MySQL 9.0 being deployed. - Attempted to connect using root credentials and received Plugin
mysql_native_password
is not loaded.
- ConfigMap Adjustments:
- Added
default_authentication_plugin=caching_sha2_password
to the MySQL configuration via a ConfigMap. - Added
mysql_native_password=ON
to the MySQL configuration via a ConfigMap. - Both attempts caused the pod to crash with the errors mentioned above.
- Downgrade Attempt:
- Tried to change the image to MySQL 8.0.
- Encountered the error Invalid MySQL server downgrade:
Cannot downgrade from 90000 to 80401. Downgrade is only permitted between patch releases.
Thank you in advance for your help!