纯属个人阅读,如有翻译错误,请指出
The primary function of the MySQL privilege system is to authenticate a user who connects from a given host and to associate that user with privileges on a database such as SELECTINSERT,UPDATE, and DELETE. Additional functionality includes the ability to have anonymous users and to grant privileges for MySQL-specific functions such as LOAD DATA INFILE and administrative operations.
 
MySQL特权系统的主要功能是对从给定主机连接的用户进行身份验证,并将该用户与数据库的特权(如SELECT,INSERT,UPDATE和DELETE)相关联。 其他功能包括允许匿名用户和授予MySQL特定功能
(如LOAD DATA INFILE和管理操作)的权限。
 

There are some things that you cannot do with the MySQL privilege system:

  • You cannot explicitly specify that a given user should be denied access. That is, you cannot explicitly match a user and then refuse the connection.

  • You cannot specify that a user has privileges to create or drop tables in a database but not to create or drop the database itself.

  • A password applies globally to an account. You cannot associate a password with a specific object such as a database, table, or routine.

在些事情你用MySQL的权限系统是处理不到的:

•您不能明确指定应拒绝给定用户访问。 也就是说,您不能明确的匹配用户,然后拒绝连接。

•您不能指定用户具有在数据库中创建或删除表的权限,但不能指定创建或删除数据库本身的权限。

•全局适用于帐户的密码。 您不能将密码与特定对象(如数据库,表或例程)关联。

The user interface to the MySQL privilege system consists of SQL statements such as CREATE USERGRANT, and REVOKE. See Section 14.7.1, “Account Management Statements”.

Internally, the server stores privilege information in the grant tables of the mysql database (that is, in the database named mysql). The MySQL server reads the contents of these tables into memory when it starts and bases access-control decisions on the in-memory copies of the grant tables.

在内部,服务器将权限信息存储在mysql数据库(即名为mysql的数据库)的授权表中。 MySQL服务器在启动时将这些表的内容读取到内存中,并基于对授权表的内存中副本的访问控制决策。

The MySQL privilege system ensures that all users may perform only the operations permitted to them. As a user, when you connect to a MySQL server, your identity is determined by the host from which you connect and the user name you specify. When you issue requests after connecting, the system grants privileges according to your identity and what you want to do.

MySQL特权系统确保所有用户只能执行允许的操作。 作为用户,当您连接到MySQL服务器时,您的身份由您连接的主机和您指定的用户名决定。 在连接后发出请求时,系统会根据您的身份和您要执行的操作授予权限。

MySQL considers both your host name and user name in identifying you because there is no reason to assume that a given user name belongs to the same person on all hosts. For example, the user joe who connects from office.example.com need not be the same person as the user joe who connects from home.example.com. MySQL handles this by enabling you to distinguish users on different hosts that happen to have the same name: You can grant one set of privileges for connections by joe from office.example.com, and a different set of privileges for connections by joe from home.example.com. To see what privileges a given account has, use the SHOW GRANTS statement. For example:

SHOW GRANTS FOR 'joe'@'office.example.com';
SHOW GRANTS FOR 'joe'@'home.example.com';
MySQL在识别您时会考虑您的主机名和用户名,因为没有理由假定给定的用户名属于所有主机上的同一个人。 例如,从office.example.com连接的用户joe不需要是与
从home.example.com连接的用户joe相同的人员。 MySQL通过使您能够区分恰好相同名称的不同主机上的用户来处理这个问题:您可以通过joe从office.example.com
授予一组连接权限,并通过joe从home获取一组不同的特权 .example.com。 要查看给定帐户具有的特权,请使用SHOW GRANTS语句。 例如:

MySQL access control involves two stages when you run a client program that connects to the server:

Stage 1: The server accepts or rejects the connection based on your identity and whether you can verify your identity by supplying the correct password.

Stage 2: Assuming that you can connect, the server checks each statement you issue to determine whether you have sufficient privileges to perform it. For example, if you try to select rows from a table in a database or drop a table from the database, the server verifies that you have the SELECT privilege for the table or the DROP privilege for the database.

当您运行连接到服务器的客户端程序时,MySQL访问控制涉及两个阶段:

阶段1:服务器根据您的身份接受或拒绝连接,以及是否可以通过提供正确的密码验证您的身份。

阶段2:假设您可以连接,服务器将检查您发出的每个语句,以确定您是否有足够的权限执行它。 例如,如果尝试从数据库中的表中选择行或从数据库中删除表,则服务器将验证您是否具有表的SELECT特权或数据库的DROP特权。

For a more detailed description of what happens during each stage, see Section 7.2.4, “Access Control, Stage 1: Connection Verification”, and Section 7.2.5, “Access Control, Stage 2: Request Verification”.

If your privileges are changed (either by yourself or someone else) while you are connected, those changes do not necessarily take effect immediately for the next statement that you issue. For details about the conditions under which the server reloads the grant tables, see Section 7.2.6, “When Privilege Changes Take Effect”.

如果您的权限在您连接时更改(由您自己或其他人),那么这些更改不会立即对您发出的下一条语句生效。 有关服务器重新加载授予表的条件的详细信息,请参见第7.2.6节“权限更改生效时”。

For general security-related advice, see Section 7.1, “General Security Issues”. For help in diagnosing privilege-related problems, see Section 7.2.7, “Troubleshooting Problems Connecting to MySQL”.

MySQL权限系统(一).The MySQL Access Privilege System 概述的更多相关文章

  1. MySQL权限系统(三).权限表 Grant Tables

    7.2.2 Grant Tables 授权表 The mysql system database includes several grant tables that contain informat ...

  2. 一文读懂mysql权限系统

    前言: MySQL权限系统的主要功能是证实连接到一台给定主机的用户,并且赋予该用户在数据库上的SELECT.INSERT.UPDATE和DELETE权限.附加的功能包括有匿名的用户并对于MySQL特定 ...

  3. MySQL权限原理及删除MySQL的匿名账户

    MySQL权限系统的工作原理 MySQL权限系统通过下面两个阶段进行认证: (1)对连接的用户进行身份认证,合法的用户通过认证,不合法的用户拒绝连接: (2)对通过认证的合法用户赋予相应的权限,用户可 ...

  4. MySQL权限系统(二). MySQL提供的特权 Privileges Provided by MySQL

    MySQL provides privileges that apply in different contexts and at different levels of operation: Adm ...

  5. mysql—Linux系统直接进入mysql服务器,并实现一些基础操作

    首先,我们需要通过以下命令来检查MySQL服务器是否启动: ps -ef | grep mysqld 如果MySql已经启动,以上命令将输出mysql进程列表 如果mysql未启动,你可以使用以下命令 ...

  6. MySQL权限和用户管理

    Mysql权限系统(由mysql权限表进行控制user和db)通过下面两个方面进行认证: 1)对于连接的用户进行身份验证,合法的通过验证,不合法的拒绝连接. 2)对于通过连接认证的用户,可以在合法的范 ...

  7. MySQL权限授权认证详解

    MySQL权限授权认证详解 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.MySQL权限系统介绍1>.权限系统的作用是授予来自某个主机的某个用户可以查询.插入.修改.删除 ...

  8. MySQL 权限与安全

    一.MySQL权限系统通过两个阶段进行认证: (A) 对用户进行身份认证,IP地址和用户名联合, (B) 对合法用户赋予相应权限,权限表在数据库启动的时候载入内存中. 二.在权限的存取过程中,会用到& ...

  9. mysql权限与安全

    一.MySQL权限系统通过两个阶段进行认证: (A) 对用户进行身份认证,IP地址和用户名联合, (B) 对合法用户赋予相应权限,权限表在数据库启动的时候载入内存中. 二.在权限的存取过程中,会用到& ...

随机推荐

  1. (一)EasyUI 使用——基本概念

    1. EasyUI是什么 EasyUI是一种第三方组织开发的一款基于jQuery的,简单易用的,功能强大的WEB[后台前端]JavaScript现成的组件库. 2.  JavaScript,AJAX, ...

  2. UIAlertViewController 2

    iOS 8的新特性之一就是让接口更有适应性.更灵活,因此许多视图控制器的实现方式发生了巨大的变化.全新的UIPresentationController在实现视图控制器间的过渡动画效果和自适应设备尺寸 ...

  3. Jenkins spring boot 自动部署方案

    原文地址:http://www.cnblogs.com/skyblog/p/5632869.html 现在主流的自动部署方案大都是基于Docker的了,但传统的自动部署方案比较适合中小型公司,下面的方 ...

  4. 数组传到后台 string[] 获取

    调试的 时候js  断点到后台 js上面也可以查看 传到后台的数据 方便查看~~

  5. 234. Palindrome Linked List【easy】

    234. Palindrome Linked List[easy] Given a singly linked list, determine if it is a palindrome. Follo ...

  6. AOF 持久化策略

    Redis为了解决AOF后台重写造成的数据不一致问题,设置了AOF重写缓冲区.即使设置了no-appendfsync-on-rewrite yes也会造成短暂的主进程阻塞.原因就在于子进程完成AOF重 ...

  7. AV1视频编码标准资源汇总

    一直不看好HEVC,总觉得这东西绝对不可能再恢复像h264那么辉煌了,如此高昂的授权费,被淘汰估计也就这一两年了,有必要预研一下AV1,马上进去二进制码流冻结流程了,感觉aom越来越近了,毕竟goog ...

  8. [浪风分享] -- 系列百度云管家 V2.1.0 单文件版-分享必用的神器

    废话不多说,神器送上 百度云管家 V2.1.0 更新时间:2013年05月22日更新内容:1.支持云端文件管理:删除.重命名.新建文件夹.移动2.支持缩略图浏览模式3.支持三种文件排序方式:按修改时间 ...

  9. AJAX = Asynchronous JavaScript and XML(异步的 JavaScript 和 XML)。

    AJAX = Asynchronous JavaScript and XML(异步的 JavaScript 和 XML). AJAX 不是新的编程语言,而是一种使用现有标准的新方法. AJAX 最大的 ...

  10. 004androidStudio ndk开发环境

    004androidStudio ndk开发环境 android studio中编译C/C++源代码 1. 配置ndk.dir 在 local.properties 添加如下配置: sdk.dir=p ...