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?
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.