One central copy of phpMyAdmin

8 posts / 0 new
Last post
#1 Wed, 04/15/2009 - 08:06
velvetpixel

One central copy of phpMyAdmin

I want to set up one central copy of phpMyAdmin under CentOS 5.3.

I am the only user. I have 10+ virtual hosts each with their own DBs and want to manage the DBs from one place rather than installing phpMyAdmin 10+ times :)

I want to be able to log into phpMyAdmin with a different username/password combo for each domain's mysql user and be able to just see that users DBs incase I host to friends in the future that want access to their own DBs without them seeing mine :)

Is anybody already doing this?

I have not been able to find config instructions online at phpMyAdmin site or through google :(<br><br>Post edited by: velvetpixel, at: 2009/04/15 08:07

Wed, 04/15/2009 - 09:58
Joe
Joe's picture

Yes, I believe this is a very common technique for generally useful tools like phpMyAdmin and SquirrelMail and such (though I use Usermin and Webmin's MySQL module for these purposes, so I don't actually have much experience with the process).

You'd basically just create a &quot;main&quot; domain, where you install phpMyAdmin. I think it already asks for username and password, right? So, you'd give it your various MySQL usernames and passwords and it would just give you access to those databases. phpMyAdmin has no concept of what &quot;domain&quot; it's running on or what database user that domain is associated with (that would require it to know an awful lot about Apache, UNIX and MySQL users, and how they all connect up). It's simply not a virtual hosting aware tool...so it doesn't matter where it runs.

--

Check out the forum guidelines!

Wed, 04/15/2009 - 10:06 (Reply to #2)
velvetpixel

Ok now it seems obvious :)
For some reason I was trying to make this harder than it is I guess.

Thanks Joe!

Wed, 04/15/2009 - 10:59 (Reply to #3)
Joe
Joe's picture

Hehehe...Yeah, we all make things more complicated than we need to sometimes.

Everything works if you let it. ;-)

--

Check out the forum guidelines!

Fri, 04/17/2009 - 12:39 (Reply to #4)
jgonzalez

This is really simple, but, never thought of it. Thanks for asking! Now I will do that also.

Mon, 05/04/2009 - 14:19 (Reply to #5)
mrwilder

If you want it to be available at anydomainonyourbox.com/php that's easy too, though...

Lets say you installed it at /usr/share/phpMyAdmin. Whatever.

Now, log in to yourbox.com:10000 (webmin)

select &quot;Servers -- Apache Webserver -- Default Server -- Aliases and Redirects&quot;

In the &quot;Document directory aliases&quot; section, add a matched pair with
&quot;/php&quot; on the left, and &quot;/usr/share/phpMyAdmin&quot; on the right.

Apply changes and restart apache.

now you can go to any domain on the box and get phpmyadmin, eg:

http://yourbox.com/php
or
http://www.virtualdomain.com/php

If that floats your boat.

Make sure you have the authentication mode set the way you intended in (sounds like you want http probably) in config.inc.php!

Good luck,
Tony

Mon, 05/04/2009 - 14:28 (Reply to #6)
mrwilder

Oh, I forgot, if you already created the domain, you may have to add the matched pair manually to the domain in question, or hand edit httpd.conf.

Tue, 05/05/2009 - 05:54 (Reply to #7)
velvetpixel

<b>Joe wrote:</b>
<div class='quote'>Yes, I believe this is a very common technique for generally useful tools like phpMyAdmin and SquirrelMail and such (though I use Usermin and Webmin's MySQL module for these purposes, so I don't actually have much experience with the process).

You'd basically just create a &quot;main&quot; domain, where you install phpMyAdmin. I think it already asks for username and password, right? So, you'd give it your various MySQL usernames and passwords and it would just give you access to those databases. phpMyAdmin has no concept of what &quot;domain&quot; it's running on or what database user that domain is associated with (that would require it to know an awful lot about Apache, UNIX and MySQL users, and how they all connect up). It's simply not a virtual hosting aware tool...so it doesn't matter where it runs.</div>

Awesome!

Thanks :)

Topic locked