I am trying to connect my laravel app (currently on my Mac) to my managed mysql db. My IP is entered as a trusted source. I was getting a different error until I followed the tutorial and used the flags connection script to connect. Now I get error: 2054 The server requested authentication method unknown to the client.
I am connecting as follows:
DB_CONNECTION=mysql
DB_URL="mysql -u my_username -p my_password -h db-mysql-nyc1-my_database_info.db.ondigitalocean.com -P 25060 -D IHC"
DB_HOST=db-mysql-nyc1-my_database_info.db.ondigitalocean.com
DB_PORT=25060
DB_DATABASE=IHC
DB_USERNAME=my_username
DB_PASSWORD=my_password
DB_SSLMODE=REQUIRED
MYSQL_ATTR_SSL_CA=/Users/melaniecarr/Desktop/ca-certificate.crt
How on earth do I connect this thing?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
OOOOH!!! I got it! I had to create a new user, but with MySQL 5 settings, and get rid of the following lines (for anyone else having this issue):
DB_URL=
DB_SSLMODE=REQUIRED
MYSQL_ATTR_SSL_CA=/Users/myusername/Desktop/ca-certificate.crt
The only other thing I saw that might help is this:
Having trouble connecting? Your MySQL client might not support the new MySQL 8 default password encryption. If you're experiencing issues with the Default (caching_sha2_password), change the mode to Legacy (mysql_native_password).
I don’t know how to do this.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.