LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 11-13-2005, 09:36 PM   #1
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Rep: Reputation: 30
Question Modifying users' privlleges in mysql; dropping; privillege by table only


Hi guys,

I've learnt how to create new accounts in mysql using both GRANT statement, or direct insertion of values into the tables using INSERT follow by FLUSH privilleges

If I want to modify the user's privillege.. say I decide to give him a bit more access.. how do I do it? Will issuing a grant statement using the same userid over write the current one? Or do I have to manually update the tables?

Also, how do I remove the users... just by using this?

DROP USER userid?

This will drop all userid for this guy right? What if I just want to drop him base on the hostname?

added: one more thing: mysql doc teaches set privilleges by database.. or ALL database. I took it upon myself that I can give user access to only CERTAIN TABLES by replacing "GRANT PRIVILLEGES ON database.*" to become GRANT PRIVILLEGES ON database.tablename to...

Am I right?

Also, this will only update mysql.tables_priv table instead in mysql.db tables, since it doesn't affect the entire database. Am I right to say that?

Because I created an account and that's what I saw the changes... as mysqldoc only mention changes to mysql.db... in my case.. for individual tables privilleges settings, mysql.tables_priv had changes instead...



added: i just realise what i did above, though using the enwly created account to login i can only see the specified tables that i give privillege to... i can't select,update whatsoever though i have already mentioned "grant select, update, insert, delete...."

in mysql.tables_priv, in the tables_priv column, the mentioned allowed commands are specify there, but in mysql.user, all the privilleges are set to 'N'

So do I have to manually go enable it.. by updating the mysql.user table?
Also, if i give select privillge via mysql.user, but for a specified table i don want to give access for SELECT, will mysql.user overwrite what is mention in mysql.tables_priv?



Please advise


thanks guys!

Last edited by Swakoo; 11-13-2005 at 10:11 PM.
 
  


Reply



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
how to edquota MySQL users? MDFH Linux - General 1 05-03-2005 01:23 PM
Mysql all users can login huscvarna Linux - Software 1 02-16-2005 06:16 AM
Modifying /etc/hosts globally (All LAN users) for loopbacking. How? ambayah Linux - General 4 08-28-2004 11:08 AM
Mysql users error dsgdevil Linux - Software 2 02-22-2003 07:04 PM
MySQL ~users santiagodelgado Linux - Networking 1 11-30-2001 08:58 AM

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

All times are GMT -5. The time now is 06:00 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