Home arrow MySQL arrow Page 6 - Access Granted

Cream Of The Crop - MySQL

mySQL comes with a pretty powerful security system, the grant tables, which allows database administrators to precisely control access to databases, tables and even specific rows and columns. In this article, find out how the five grant tables combine to offer power users a tremedous amounts of flexibility and control over database access and operations.

TABLE OF CONTENTS:
  1. Access Granted
  2. Meet Joe User
  3. Beeping Turkeys
  4. Born Privileged
  5. The Perfect Host
  6. Cream Of The Crop
  7. The Mechanics
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 9
April 24, 2001

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
In addition to the three tables already discussed, newer versions of mySQL also come with two additional tables, the "tables_priv" and "columns_priv" tables. These allow a database administrator to restrict access to specific tables in a database, and specific columns of a specific table, respectively.

Here's what these two tables look like:

tables_priv: +-------------+---------------------------+ | Field | Type | +-------------+---------------------------+ | Host | char(60) | | Db | char(60) | | User | char(16) | | Table_name | char(60) | | Grantor | char(77) | | Timestamp | timestamp(14) | | Table_priv | set('Select','Insert'...) | | Column_priv | set('Select','Insert'...) | +-------------+---------------------------+ columns_priv: +-------------+----------------------------------------------+ | Field | Type | +-------------+----------------------------------------------+ | Host | char(60) | | Db | char(60) | | User | char(16) | | Table_name | char(60) | | Column_name | char(60) | | Timestamp | timestamp(14) | | Column_priv | set('Select','Insert','Update','References') | +-------------+----------------------------------------------+

The following example would restrict user to performing SELECT operations on table "cream" *only* - any attempt to run a SELECT query on another table within the same database would result in an error.

+-----------------+-------+------+------------+---------------+-------------+ | Host | Db | User | Table_name | Table_priv | Column_priv | +-----------------+-------+------+------------+---------------+-------------+ |lost.soul.com | db563 | john | cream | Select | | +-----------------+-------+------+------------+---------------+-------------+


 
 
>>> More MySQL Articles          >>> More By icarus, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

MYSQL ARTICLES

- Oracle Unveils MySQL 5.6
- MySQL Vulnerabilities Threaten Databases
- MySQL Cloud Options Expand with Google Cloud...
- MySQL 5.6 Prepped to Handle Demanding Web Use
- ScaleBase Service Virtualizes MySQL Databases
- Oracle Unveils MySQL Conversion Tools
- Akiban Opens Database Software for MySQL Use...
- Oracle Fixes MySQL Bug
- MySQL Databases Vulnerable to Password Hack
- MySQL: Overview of the ALTER TABLE Statement
- MySQL: How to Use the GRANT Statement
- MySQL: Creating, Listing, and Removing Datab...
- MySQL: Create, Show, and Describe Database T...
- MySQL Data and Table Types
- McAfee Releases Audit Plugin for MySQL Users

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: