Page 1 of 1

Connecting to my hosted Daatabase through xampp

PostPosted: 17. June 2012 03:51
by Arroush
I have a live website that is hosted by godaddy, i want to work on the website and test it on localserver (Xampp) using the live Database which is connected with my live website, i changed the variables in xampp/phpmyadmin/config.inc & xampp/mysql/bin/my.in to those which are compatible with variables in mysql_connect function for my website, now when i launch phpmyadmin through xampp, i find that its reading my live database, but when i try to launch my testing website (http://localhost/website/index.php) it gives me connection failed ( which means that the mysql_connect function didnt work), what should i do?

Re: Connecting to my hosted Daatabase through xampp

PostPosted: 17. June 2012 04:14
by Altrea
Hi Arroush (there is ALWAYS time for a short salutation, especially if you are asking for help in a community board. It'sa matter of politeness),

Arroush wrote:i changed the variables in [...] xampp/mysql/bin/my.in to those which are compatible with variables in mysql_connect function for my website

Why that? You don't want to use the local MySQL instance so no need to edit any of it's settings.

Arroush wrote:now when i launch phpmyadmin through xampp, i find that its reading my live database, but when i try to launch my testing website (http://localhost/website/index.php) it gives me connection failed ( which means that the mysql_connect function didnt work), what should i do?

fix the mysql connection in your testing website.

best wishes,
Altrea