Welcome to WebmasterWorld Guest from 54.145.246.183

Forum Moderators: brotherhood of lan & mack

Connecting to a MySQL database using Xampp

Connecting to a MySQL database using Xampp

   
8:04 pm on Sep 20, 2008 (gmt 0)

5+ Year Member



Hi,

I'm trying to use Xampp with my site to test changes offline. The database connection set as localhost works fine for the site on my domain. I can see that as the database and website are in the same place this would work.

I am presuming localhost needs to be changed when using xammp, to the IP address where the database is. I tried changing localhost to the Shared Ip Address listed in my cpanel but this didn't work. Am I doing the right thing?

I also tried setting the username and password in the xampp admin to the ones used for my site. This gives me an access violation popup, so not sure what to do there.

Can anyone point me in the right direction to get this working?

Thanks

12:34 pm on Sep 21, 2008 (gmt 0)

WebmasterWorld Administrator mack is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Are you trying to connect to your live (remote) database but viewing your development site in Xampp? If so you may need to allow your IP address within the cpanel area of the remote server. By default Mysql will only allow connections from localhost, you will need to specify your Ip address as an allowed connection. This is a mysql security feaure.

Mack.

10:06 pm on Sep 21, 2008 (gmt 0)

5+ Year Member



thanks Mack!

Yes I was trying to connect to my live database. I added my IP address in the remote mysql section of cpanel and it sprung into life.

nice one :)

6:54 pm on Sep 22, 2008 (gmt 0)

WebmasterWorld Administrator mack is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Glad to help. :)

Mack.

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month