How do I access the same database from different computers?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Postby Granpoh » 16. November 2008 00:59

glitzi85 wrote:What do you want to do? Why do you want to connect to the DB from another Computer?
glitzi

Granpoh wrote:I have 2 computers and I set up a database in phpMyamin (Database 'Blah') with one computer and did some work in it, but then I was on my other computer and wanted to work on that same database (Database 'Blah') with that computer.

Thanks
Granpoh
 
Posts: 39
Joined: 27. April 2008 10:23

Postby Dave_L » 16. November 2008 01:05

I do that by running phpMyAdmin on one computer from the other one by browsing to the IP address of the target computer.

Example: http://192.168.0.100/phpmyadmin/
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Postby Granpoh » 16. November 2008 01:43

Dave_L wrote:I do that by running phpMyAdmin on one computer from the other one by browsing to the IP address of the target computer.

Example: http://192.168.0.100/phpmyadmin/


Hello,

I had tried that earlier, but after typing in computer A's IP address into my browser as you and Wiedmann suggested, all I got was a web page telling me "Internet Explorer cannot display the webpage", etc.
Granpoh
 
Posts: 39
Joined: 27. April 2008 10:23

Postby Dave_L » 16. November 2008 01:51

Can you access other web pages on the other computer?
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Postby Granpoh » 16. November 2008 01:55

Dave_L wrote:Can you access other web pages on the other computer?


Yes.
Granpoh
 
Posts: 39
Joined: 27. April 2008 10:23

Postby Sharley » 16. November 2008 02:26

Do you get the XAMPP Welcome page when you type only:
http://computer_A_IP_address

Check in your httpd.conf file for this line:
Code: Select all
Listen *:80

If the line is Listen 80 or similar then try and change it to the above Listen *:80 and then save the file and restart Apache.

This change is an IP wild card so that Apache will listen for a connection from any IP and has been known to fix some quirky connection issues.

EDIT:
Not sure about this one as I don't have a home network.

You may also have to add an entry to your Windows HOSTS file in .\Windows\system32\drivers\ext folder similar to this:
your.A.computer.Ip localhost

There may also be a HOSTS file entry needed in the B Computer but a network guru may provide more on these HOSTS file entries for you.
Last edited by Sharley on 16. November 2008 02:45, edited 1 time in total.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Postby Dave_L » 16. November 2008 02:40

A firewall could be blocking the connection, but you said that you could access web pages other than phpmyadmin.
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Postby Granpoh » 16. November 2008 02:49

Dave_L wrote:A firewall could be blocking the connection, but you said that you could access web pages other than phpmyadmin.


I had turned my firewall off prior to trying, but it still didn't work. Is there any kind of file that I can maybe copy from computer A to computer B so that the database would be on that computer as well?
Granpoh
 
Posts: 39
Joined: 27. April 2008 10:23

Postby Dave_L » 16. November 2008 12:32

The preferred way of doing that is to export the database as a .sql file, using phpMyAdmin or the command line utility mysqldump, and then import the .sql file, using phpMyAdmin or the command line utility mysql.

Another method is to copy the actual files containing the database.

On my Win2K XAMPP install, the actual files containing the database are in Program Files/xampp/mysql/data. The path may be different on your install. There's one subdirectory for each database. The name of the subdirectory is the database name. Copy that subdirectory to the other computer.

The latter method of copying a database can fail if the MySQL versions differ, or if file attributes are not preserved.
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 67 guests