General SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesGeneral SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 2nd, 2003, 07:25 AM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 82 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 57 sec
Reputation Power: 7
privilleges

Hi,

DB: Mysql
Platform: Linux -- NetBSD

I have a database and abt 60 users, where there are user accounts for them. I would like them to create, delete, modify, update, insert,drop ..etc tables in their database only. For example DB1 user can do all those things in their database only.
How should I do that ?

I have look into the user table in mysql DB, and I found for all these users, their privilleges are set to 'N". But they are still able to create tables in their own database. Why so ?

thanks for ur contribution

Rathaur
__________________
Rathaur
======================
Knowledge is Power

Reply With Quote
  #2  
Old July 2nd, 2003, 08:30 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Did you issue "flush privileges" after modifying the table? Check out mysql.com for the complete reference guide.

Reply With Quote
  #3  
Old July 2nd, 2003, 09:57 PM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
There are two tables in the "mysql" database you need to take note of.

1. "user" table.
This table does hold user information ( username, password, host). This is all you need to be concerned about in your case. All the other fields are set to 'N' because you don't want to give any of these users global database access. Any access priviledge in this table is effective for ANY database on the server. You probably don't want this.


2. "db" table.
This table will list the host, database name, and user that can access it. It also specifies which actions that user can take on that particular database. I know it is a little complex, however, it is very powerful IMHO.

Now you have two choices... Modify the "db" table directly with an UPDATE db SET... sql query or use the GRANT commands.


I find it useful to flush privileges either way after one of these actions.
__________________
__________________________________________________ _
Wil Moore III, MCP | Integrations Specialist | Senior Consultant
Are You Listed...? | DigitallySmooth Inc.

Reply With Quote
  #4  
Old July 3rd, 2003, 12:34 AM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 82 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 57 sec
Reputation Power: 7
thanks i got it ...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesGeneral SQL Development > privilleges


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 3 hosted by Hostway
Stay green...Green IT