Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old October 27th, 2005, 04:43 PM
jjanes jjanes is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: San Ramon, CA
Posts: 70 jjanes User rank is Private First Class (20 - 50 Reputation Level)jjanes User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 23 m 48 sec
Reputation Power: 7
phpMyadmin databases are viewable to all

Hi I am running phpMyAdmin 2.6.4-pl1
with MySQL 4.0.20-standard on RedHat Linux 9.0

Almost everything works great except that any of the users can see the all of the database names when the login they can only access their own database but all of the others show up as databases but with a - where the number of tables usually is displayed.

In my prior version of phpmyadmin and mysql and redhat linux, not sure of the versions but I can find out if it is important, this was not the case. When a given user logged in they could only see their own database to which they would have complete access to. This is how I want to set my current version to be like.

Since my database names are based on my customers I do not want my customers to know about my other customers as it could lead to possible issues.

What are the settings I need to look at to change how this new version works

Thanks
Jeff

If there are any additional settings you need for information let me know and I can try to get them

Reply With Quote
  #2  
Old October 27th, 2005, 05:03 PM
SimonGreenhill's Avatar
SimonGreenhill SimonGreenhill is offline
(retired)
Dev Shed God 11th Plane (10000 - 10499 posts)
 
Join Date: Dec 2003
Location: The Laboratory
Posts: 10,101 SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)  Folding Points: 4925 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 5 h 49 m 4 sec
Reputation Power: 1331
Facebook
I'm not sure how phpMyAdmin is doing it, but you may want to not give the users SHOW DATABASES permissions. You can also restrict PMA to only use one/a few databases by entering them in the right place in the config.inc.php file.

--Simon

Reply With Quote
  #3  
Old October 27th, 2005, 05:20 PM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,299 jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 Days 1 h 54 m 17 sec
Reputation Power: 760
I've been playing with this a bit lately myself and this is what I have: database names are prefixed with usernames or domain names, like foo_com_database. I then create a MySQL user, foo_com and give them permissions on foo_com_% (% is a wildcard). You then set up phpMyAdmin to use HTTP auth or cookie auth so that the user logs in with his or her username. The result is that user foo_com only sees foo_com_* databases and can only (or should only be able to) create databases that start with foo_com_ (provided you let them create databases via phpMyAdmin).
__________________
# Jeremy

Explain your problem instead of asking how to do what you decided was the solution.

Reply With Quote
  #4  
Old October 27th, 2005, 05:34 PM
jjanes jjanes is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: San Ramon, CA
Posts: 70 jjanes User rank is Private First Class (20 - 50 Reputation Level)jjanes User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 23 m 48 sec
Reputation Power: 7
Simon-Where would I set the SHOW DATABASES permission is it in one of the mysql tables.
-----------------------------

Jeremy- In my old setup and current one a user had a domain name of xyzbiz.com there database would be called xyzbiz and when they logged on to phpMyAdmin the xyzbiz database would be the only one visible if I looged on as the overall owner of the server or I am assuming admin I would get a drop down where I could select any of the databases and the subsequentially any of the tables and work on them as needed from one spot(my admin level). On the new setup EVERYONE gets the dropdown to select databases but only the database of the specific usere will show any tables that exist all other databases show the hyphen and if they are clicked on an error message pops up and says that the given user does not have the correct permission to access ths table.

The table names were derived directly from the username of the account unless the username was too long and I could access them directly in linux through SSH or via phpMyAdmin using the exact same name.

I also have many databases already created along with db based web pages so I do not think your methodology would
benefit me currently Thanks you for your input though if you have any other ideas I will be glad to take a look at them.
-----------------------------

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > phpMyadmin databases are viewable to all


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway