csweb error in connecting to database

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
Post Reply
Yass
Posts: 103
Joined: November 11th, 2017, 1:26 am

csweb error in connecting to database

Post 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
bmuganda
Posts: 37
Joined: January 18th, 2018, 11:57 am

Re: csweb error in connecting to database

Post by bmuganda »

Hi Mate,

Experiencing same issue. Perhaps tech team can help us reslove this
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: csweb error in connecting to database

Post 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.
Yass
Posts: 103
Joined: November 11th, 2017, 1:26 am

Re: csweb error in connecting to database

Post by Yass »

Dear Josh

Please find attached the file :
Attachments
csweb.JPG
csweb.JPG (68.12 KiB) Viewed 5900 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: csweb error in connecting to database

Post 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.
Yass
Posts: 103
Joined: November 11th, 2017, 1:26 am

Re: csweb error in connecting to database

Post 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.
Attachments
csweb2.JPG
csweb2.JPG (77.06 KiB) Viewed 5898 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: csweb error in connecting to database

Post 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.
Yass
Posts: 103
Joined: November 11th, 2017, 1:26 am

Re: csweb error in connecting to database

Post by Yass »

Jost ... you the man !!! Bingo and one thanks Boss
Post Reply