Page 1 of 1
csweb error in connecting to database
Posted: January 18th, 2018, 10:19 am
by Yass
Hi Cspro Team ,
I followed the instruction in one of your training notes to setup CSWEB. I have this error
"Failed to connect to database. SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known"
I cant figure out where this error is coming from . I quick fix is needed . Thanks
Re: csweb error in connecting to database
Posted: January 19th, 2018, 3:35 am
by bmuganda
Hi Mate,
Experiencing same issue. Perhaps tech team can help us reslove this
Re: csweb error in connecting to database
Posted: January 19th, 2018, 7:12 am
by josh
Please post the configuration you used i.e. the info you entered during CSWeb setup. In particular the values for Hostname and CSWeb API URL.
Re: csweb error in connecting to database
Posted: January 19th, 2018, 8:10 am
by Yass
Dear Josh
Please find attached the file :
Re: csweb error in connecting to database
Posted: January 19th, 2018, 8:52 am
by josh
Try using "localhost" (without http://) for the hostname. This is the hostname of your MySQL database connection, not the URL for the website. Unless you have your database on a different server from your webserver this should always be localhost.
Re: csweb error in connecting to database
Posted: January 19th, 2018, 9:22 am
by Yass
Hi Josh
I tried the "localhost" earlier and it don't work. I will not mind to share the cpanel credential with u to have a look.
Re: csweb error in connecting to database
Posted: January 19th, 2018, 10:31 am
by josh
That error is just because the username/password for the MySQL database user is incorrect. Make sure you added the user named "cspro" in MySQL and that you are using the correct password for it.
Re: csweb error in connecting to database
Posted: January 19th, 2018, 11:26 am
by Yass
Jost ... you the man !!! Bingo and one thanks Boss