Trying to use wp-cli with our managed database from our droplet, wordpress works and connects fine on the front end and admin, but connections via wp-cli just give me a " Error establishing a database connection."
Obviously its reading from the same wp-config file, and connecting as the same user/port/host and from the same IP so that is all valid, any idea whys not connecting, as its Terminal, does the managed database need to be configured to accept connections from that port? or the firewall on the server likewise?
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 $100 of credit to try our products over 60 days!