发信人: engineer (剑胆琴心~还是得走,sigh...), 信区: Linux
标 题: MySQL数据库及其ODBC接口的介绍(2) (转载)
发信站: BBS 水木清华站 (Mon Aug 9 18:03:20 1999)
【 以下文字转载自 Database 讨论区 】
【 原文由 engineer 所发表 】
五.MySQL的权限管理
MySQL的权限管理非常复杂,可以说这是它的得意之处,安全的管理有利于系统的稳抖?
基本原则: [user] from [host] to [db] (of localhost)
系统数据库mysql中有四个分区:func,user,db,host.其中后三个有关权限管理.
它们的结构如下:
Database: mysql Table: user Rows: 3
+---------------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+----------+------+-----+---------+-------+
| Host | char(60) | | PRI | | |
| User | char(16) | | PRI | | |
| password | char(16) | | | | |
| ......_priv | char(1) | | | N | |
+---------------+----------+------+-----+---------+-------+
Database: mysql Table: db Rows: 3
+-------------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+----------+------+-----+---------+-------+
| Host | char(60) | | PRI | | |
| Db | char(32) | | PRI | | |
| User | char(16) | | PRI | | |
| ......_priv | char(1) | | | N | |
+-------------+----------+------+-----+---------+-------+
Database: mysql Table: host Rows: 0
+-------------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+----------+------+-----+---------+-------+
| Host | char(60) | | PRI | | |
| Db | char(32) | | PRI | | | <