Change caching_sha2_password to mysql_native_password on a DigitalOcean's Managed MySQL Database

Опубликовано: 21 Март 2025
на канале: Bobby Iliev
16,171
32

As caching_sha2_password was introduced in MySQL 8.0, but the PHP has not implemented this yet, in order to be able to connect to MySQL 8 from a PHP script, you need to change your authentication method from caching_sha2_password to mysql_native_password.

This is a short demo on how to do that change and connect to a DigitalOcean Managed MySQL.

I use DigitalOcean for all of my demos, you can use the link below to get a free $100 credit and spin up your own Linux servers!

https://m.do.co/c/2a9bba940f39

Follow me on:

Twitter:   / bobbyiliev_  
Website: https://bobbyiliev.com