hi , im trying DO managed databases and im facing some problem conencting it to my wordpress.
i read some on this community but i cant found the correct answer.
i have tried
ALTER USER 'MYUSER'@localhost IDENTIFIED WITH mysql_native_password BY 'MYPASSWORD';
and still cant connect.
i also tried https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-managed-database-ubuntu-18-04
mysql version : mysql Ver 8.0.19 for Linux on x86_64 (MySQL Community Server - GPL)
this is how i create database and user
CREATE DATABASE MYDATABASES DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE USER 'MYUSER'@'localhost' IDENTIFIED WITH mysql_native_password BY 'MYPASSWD';
CREATE USER 'MYUSER'@'server_public_ip' IDENTIFIED WITH mysql_native_password BY 'MYPASSWD';
CREATE USER 'MYUSER'@'server_private_ip' IDENTIFIED WITH mysql_native_password BY 'MYPASSWD';
GRANT ALL PRIVILEGES ON MYDATABASES.* TO 'MYUSER'@'server_private_ip';
GRANT ALL PRIVILEGES ON MYDATABASES.* TO 'MYUSER'@'server_public_ip';
GRANT ALL PRIVILEGES ON MYDATABASES.* TO 'MYUSER'@'localhost';
is there something that im missing ?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi @advcloudjagoan,
Yes I recently answered a similar question here:
https://www.digitalocean.com/community/questions/how-to-change-caching_sha2_password-to-mysql_native_password-on-a-digitalocean-s-managed-mysql-database
In case that you’ve already set the authentication type for your user to
mysql_native_password
but you are still getting the error, then you most likely need to upgrade to PHP 7.2 or above in order to get this working.Hope that this helps! Let me know if you have any questions. Regards, Bobby