LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-05-2009, 05:30 AM   #1
dipuasks
Member
 
Registered: Oct 2005
Location: India
Distribution: Redhat 7-9,Fedora Core 3 - 9, RHEL 4 -5, CentOS 4 - 5, Ubuntu 7.10 - 12.10, Mandirva 2008 -2009
Posts: 133

Rep: Reputation: 16
How to remove access from only one database(MySQL)


Hello,

I have given access for all databases to one user with the below command:

GRANT ALL PRIVILEGES ON *.* TO user@host IDENTIFIED BY 'passwd' WITH GRANT OPTION;

Now I want to remove privilege from that user from only one database. How can I do this?

Thanks,
Dipu
 
Old 03-05-2009, 06:49 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
AFAIK you should revoke all privileges on *.*:
Code:
REVOKE ALL PRIVILEGES ON * . * FROM user@host
and then add manually the DBs that you want your user to have all privileges

Last edited by bathory; 03-05-2009 at 06:59 AM.
 
Old 03-05-2009, 10:09 AM   #3
dipuasks
Member
 
Registered: Oct 2005
Location: India
Distribution: Redhat 7-9,Fedora Core 3 - 9, RHEL 4 -5, CentOS 4 - 5, Ubuntu 7.10 - 12.10, Mandirva 2008 -2009
Posts: 133

Original Poster
Rep: Reputation: 16
Yes that I know but it's really irritating to do that when there are lots of databases on one server and I guess there is nothing like SCHEMA thing in MySQL
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql - can't access mysql database as root yogaboy Linux - Software 5 12-28-2006 06:58 AM
Need database program to access MySQL apachedude Linux - Software 12 01-03-2006 10:50 AM
How do I remove a database in mysql? shelby Linux - Software 4 11-06-2003 10:41 AM
MySQL on RedHat 9 GUI, can't access database linuxquestionsu Linux - Software 0 10-09-2003 02:44 PM
MySQL Cannot Access Database ChineseElite Linux - General 13 11-27-2002 08:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration