Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I grant usage to a table in

Status
Not open for further replies.

buzzt

Programmer
Oct 17, 2002
171
CA
How do I grant usage to a table in my database to a someone from a specific IP address? What about just anybody from anywhere?

Also, how do I get rid of the user once I am done with him. I mean, I can REVOKE his rights, but how (where) do I delete him?
 
The syntax for the GRANT and DELETE statement can be found here:
To grant permission on a specific database and table to a specific username and IP is something like:

GRANT SELECT ON databasename.columnname TO 'username'@'1.2.3.4' IDENTIFIED BY 'password'

Make sure to read on the use of wildcards in the host part of the username.

Once you have REVOKEd permissions, the user's record can be deleted from the tables "user" and "db" in the "mysql" database. Tinker with these tables with extreme caution. Want the best answers? Ask the best questions: TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top