Welcome to WebmasterWorld Guest from 54.221.81.125

Forum Moderators: mack

Message Too Old, No Replies

Connecting to a MySQL database using Xampp

Connecting to a MySQL database using Xampp

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

Junior Member

5+ Year Member

joined:Aug 6, 2008
posts: 135
votes: 0


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 Sept 21, 2008 (gmt 0)

Moderator This Forum from GB 

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

joined:June 15, 2001
posts:7581
votes: 10


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 Sept 21, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:Aug 6, 2008
posts:135
votes: 0


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 Sept 22, 2008 (gmt 0)

Moderator This Forum from GB 

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

joined:June 15, 2001
posts:7581
votes: 10


Glad to help. :)

Mack.