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: Editing wp-config.php – Documentation – WordPress.org

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?

@santash.jena I am also facing the same issue can you please provide some insight how to resolve this error.

@Nautilus @pmpcert2013

Maybe this can help: https://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html