Databases being shared across localhost and virtual servers

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

Databases being shared across localhost and virtual servers

Postby insomn3ak » 17. October 2004 05:45

I've set up 3 virtual hosts in the config.inc.php file. I've set the default server to 'localhost' so it automatically comes up in phpMyAdmin. I see the demo databases in phpMyAdmin for 'localhost' as well.

Here's the problem...
I create a new database and populate it with test data. I'm connecting to 'localhost' to create the new database in. However, when I look in phpMyAdmin, I see the new database under ALL the servers. My understanding was that I should only see the database in the virtual server that I created it in...right? I even see the demo databases whenever I switch to the virtualhosts that I created. Is there a way to keep the databases seperate for each server?

Thanks for any help anyone can give...
insomn3ak
 
Posts: 13
Joined: 15. October 2004 09:05

Postby Wiedmann » 17. October 2004 12:44

Hallo,

there is a misunderstanding in your knowledge about MySQL...
MySQL nothing knows about VirtualHosts. With the different entries in phpMyAdmin, you can manage different MySQL-server.

Solution:
Make 3 new databases and 3 new user. Give each user rights on only one of those databases. No global rights. Then, in scripts on vhost1 use user1, scripts on vhost2 use user2 and scripts on vhost3 use user3.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby insomn3ak » 18. October 2004 20:12

ahh, makes more sense now...thanks
insomn3ak
 
Posts: 13
Joined: 15. October 2004 09:05


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 127 guests