I want to move my local DB that currently resides with my Nginx web server what I did so far was:
for some reason, I receive the infamous error message " Error establishing a database connection."
I am a bit newbie at this, so no doubt I am missing something critical here.
when I try to connect to the remote DB via terminal with the flag parameters on the staging droplet, it connects just fine, so I have no idea what the issue could be because I assume if I can connect with no problems, so it’s not a networking issue.
here’s my wp-config.php
// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'My_db'); /** MySQL database username */ define('DB_USER', 'username_i_got_from_do'); /** MySQL database password */ define('DB_PASSWORD', 'password_i_got_from_do'); /** MySQL hostname */ define('DB_HOST', 'hostname.ondigitalocean.com'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8mb4'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', '');
Any idea’s what else I can check?
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!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!