Not able to connect to the MariaDB database

What have I missed. What changes have I missed in the wp-config.php file?

I am unable to connect to the database.

-Thanks in advance for your help!

Hi @santash.jena

This is not the correct way to define DB_HOST in wp-config.php file. Please take help from this tutorial: https://wordpress.org/support/article/editing-wp-config-php/

Thanks
Inderpreet

Hi @Inderpreet, I have tried :3306. But it didn’t work as well.

Please guide!

-Thanks

Hi @santash.jena

Also make sure mariadb service is up and running and try to troubleshoot using telnet or something to see if you are able to reach mariadb server from app hosts.

Thanks
Inderpreet

Thanks for the hints. I was able to complete this Question.

I have another question, I used scp command to transfer the file from jumphost to storage, was it necessary?
Or do we have other commands by which we didn’t required this?

-Thanks

Hi @santash.jena

Good to know you are able to complete this. Which file you are mentioning about exactly ?

Thanks
Inderpreet

The mysql dump file in jump_host server which was already present.

Yea right. That is mentioned in the question that dump file is present on the jump host so you might need to copy that to DB host first as necessary.

Hi @Inderpreet

I’m also not able to connect to MariaDB from the WP website. However am able to connect to the db from the app servers successfully

@santash.jena In wp-config.php, I have tried the dbhost as 172.16.239.10 and 172.16.239.10:3306 but both are not working. What worked for you?