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
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 “main” 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 “domain” 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.
Ok now it seems obvious
For some reason I was trying to make this harder than it is I guess.
Hehehe…Yeah, we all make things more complicated than we need to sometimes.
Everything works if you let it.
This is really simple, but, never thought of it. Thanks for asking! Now I will do that also.
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 "Servers – Apache Webserver – Default Server – Aliases and Redirects"
In the "Document directory aliases" section, add a matched pair with
"/php" on the left, and "/usr/share/phpMyAdmin" on the right.
Apply changes and restart apache.
now you can go to any domain on the box and get phpmyadmin, eg:
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!
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.