Page 1 of 2

How do I access the same database from different computers?

PostPosted: 09. November 2008 00:34
by Granpoh
How do I access the same database from different computers?

Thanks for all help.

PostPosted: 10. November 2008 14:42
by glitzi85
Please do not delete your posts! If the problem is not existing any more, please just add another post with the solution or edit your original post by adding the solution.

If somebody is searching for the same problem he will find an senseless post without any helpful information. That's not the helping in any way.

glitzi

PostPosted: 10. November 2008 20:38
by Granpoh
What on Earth are you talking about? I've not deleted any posts!

PostPosted: 10. November 2008 20:51
by glitzi85
:?: In all of your posts the question is replaced with this message...

Edit: Or do you really ask your Questions in the Subject :shock:

PostPosted: 10. November 2008 21:12
by Granpoh
I ask my questions in the subject.

PostPosted: 10. November 2008 21:35
by Wiedmann
How did you access the database from one computer?

BTW:
You have a specific question, or error message, problem...?)

PostPosted: 10. November 2008 22:03
by Granpoh
Wiedmann wrote:How did you access the database from one computer?

BTW:
You have a specific question, or error message, problem...?)



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. Is there a way to do this?

Thanks

PostPosted: 10. November 2008 22:14
by Sharley
Edited - seems my reply was irrelevant but stimulated a more positive response.

PostPosted: 10. November 2008 23:29
by Wiedmann
I have 2 computers

XAMPP (or Apache, MySQL, PHP) is installed on both computers?

If XAMPP is only on one computer:
I have 2 computers and I set up a database in phpMyamin (Database 'Blah') with one computer and did some work in it,

So you have used "http://localhost/phpmyadmin/" to work with the db on computer A.

but then I was on my other computer and wanted to work on that same database (Database 'Blah') with that computer.

On conputer B, you just replace "localhost" with the IP or computername of computer B, like "http://computerb/phpmyadmin/"

PostPosted: 11. November 2008 02:04
by Granpoh
Wiedmann wrote:XAMPP (or Apache, MySQL, PHP) is installed on both computers?

If XAMPP is only on one computer:
So you have used "http://localhost/phpmyadmin/" to work with the db on computer A.

On conputer B, you just replace "localhost" with the IP or computername of computer B, like "http://computerb/phpmyadmin/"


I have XAMPP on both computers, but datablase "Blah" is only on one of my computer's copies of phyMyadmin. I want to be able to work on that database "Blah" from the other computer as well.

PostPosted: 11. November 2008 02:32
by Wiedmann
I want to be able to work on that database "Blah" from the other computer as well.

Ok, you want access a database on computer A from a PHP script on computer B?

--> On computer A you must have a user in MySQL with access rights from everywhere. You can create such user with e.g. phpMyAdmin on computer A. Got to "Privileges" --> "Add new user" and And choose "Any Host" (%) for this user. (Or change a user you already have)

On computer B you use this user in your PHP script and as hostname you use the computer name or ip from computer A.

PostPosted: 11. November 2008 03:27
by Granpoh
you use this user in your PHP script



What does that mean?

PostPosted: 11. November 2008 11:22
by Dave_L
If you're accessing MySQL from a PHP script, you would connect to MySQL as that user. If you're using phpMyAdmin or another method to access MySQL, you would still connect to MySQL as that user.

PostPosted: 15. November 2008 09:19
by Granpoh
Well, on computer A, I set up the user with 'any host' as suggested, yet "practically", I'm not sure what exactly to do next on the other computer. I mean, when I go to the other computer, what 'specifically' do I do then? It's as if that computer has never heard of such a database? Am I supposed to log in or something?

PostPosted: 15. November 2008 16:19
by glitzi85
What do you want to do? You should know this. Accessing a Database can be done in thousand of ways. Why do you want to connect to the DB from another Computer?

glitzi