<small id='h3yid'></small><noframes id='h3yid'>

    <i id='h3yid'><tr id='h3yid'><dt id='h3yid'><q id='h3yid'><span id='h3yid'><b id='h3yid'><form id='h3yid'><ins id='h3yid'></ins><ul id='h3yid'></ul><sub id='h3yid'></sub></form><legend id='h3yid'></legend><bdo id='h3yid'><pre id='h3yid'><center id='h3yid'></center></pre></bdo></b><th id='h3yid'></th></span></q></dt></tr></i><div id='h3yid'><tfoot id='h3yid'></tfoot><dl id='h3yid'><fieldset id='h3yid'></fieldset></dl></div>

  • <tfoot id='h3yid'></tfoot>
        <bdo id='h3yid'></bdo><ul id='h3yid'></ul>

        <legend id='h3yid'><style id='h3yid'><dir id='h3yid'><q id='h3yid'></q></dir></style></legend>

        MySQL:何时真正需要 MySQL 中的 Flush Privileges?

        MySQL: When is Flush Privileges in MySQL really needed?(MySQL:何时真正需要 MySQL 中的 Flush Privileges?)

        <small id='ryO8E'></small><noframes id='ryO8E'>

          • <bdo id='ryO8E'></bdo><ul id='ryO8E'></ul>

                  <tfoot id='ryO8E'></tfoot><legend id='ryO8E'><style id='ryO8E'><dir id='ryO8E'><q id='ryO8E'></q></dir></style></legend>
                  <i id='ryO8E'><tr id='ryO8E'><dt id='ryO8E'><q id='ryO8E'><span id='ryO8E'><b id='ryO8E'><form id='ryO8E'><ins id='ryO8E'></ins><ul id='ryO8E'></ul><sub id='ryO8E'></sub></form><legend id='ryO8E'></legend><bdo id='ryO8E'><pre id='ryO8E'><center id='ryO8E'></center></pre></bdo></b><th id='ryO8E'></th></span></q></dt></tr></i><div id='ryO8E'><tfoot id='ryO8E'></tfoot><dl id='ryO8E'><fieldset id='ryO8E'></fieldset></dl></div>
                    <tbody id='ryO8E'></tbody>

                  本文介绍了MySQL:何时真正需要 MySQL 中的 Flush Privileges?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在创建新表和一个用户时,我通常只调用以下命令:

                  When creating new tables and a user to go along with it, I usually just invoke the following commands:

                  CREATE DATABASE mydb;
                  GRANT ALL PRIVILEGES ON mydb.* TO myuser@localhost IDENTIFIED BY "mypassword";
                  

                  在发出前两个命令后,我从未需要使用 FLUSH PRIVILEGES 命令.用户可以登录并使用他们的数据库并运行连接到数据库的 PHP 脚本就好了.然而,我几乎在我看过的每个教程中都看到了这个命令.

                  I have never ever needed to utilize the FLUSH PRIVILEGES command after issuing the previous two commands. Users can log in and use their database and run PHP scripts which connect to the database just fine. Yet I see this command used in almost every tutorial I look at.

                  什么时候真正需要 FLUSH PRIVILEGES 命令,什么时候不需要?

                  When is the FLUSH PRIVILEGES command really needed and when is it unnecessary?

                  推荐答案

                  通过 GRANT 选项分配的权限不需要 FLUSH PRIVILEGES 生效 - MySQL 服务器会注意到这些更改并立即重新加载授权表.

                  Privileges assigned through GRANT option do not need FLUSH PRIVILEGES to take effect - MySQL server will notice these changes and reload the grant tables immediately.

                  来自 MySQL 文档:

                  如果您直接使用以下语句修改授权表INSERT、UPDATE 或 DELETE,您的更改对权限没有影响检查直到您重新启动服务器或告诉它重新加载表.如果您直接更改授权表但忘记重新加载他们,您的更改在您重新启动服务器之前无效.这个可能会让您想知道为什么您的更改似乎没有任何影响!

                  If you modify the grant tables directly using statements such as INSERT, UPDATE, or DELETE, your changes have no effect on privilege checking until you either restart the server or tell it to reload the tables. If you change the grant tables directly but forget to reload them, your changes have no effect until you restart the server. This may leave you wondering why your changes seem to make no difference!

                  要告诉服务器重新加载授权表,请执行刷新权限操作.这可以通过发出 FLUSH 来完成PRIVILEGES 语句或通过执行 mysqladmin flush-privileges 或mysqladmin 重载命令.

                  To tell the server to reload the grant tables, perform a flush-privileges operation. This can be done by issuing a FLUSH PRIVILEGES statement or by executing a mysqladmin flush-privileges or mysqladmin reload command.

                  如果您使用帐户管理间接修改授权表GRANT、REVOKE、SET PASSWORD 或 RENAME USER 等语句,服务器注意到这些变化并将授权表加载到内存中立即再次.

                  If you modify the grant tables indirectly using account-management statements such as GRANT, REVOKE, SET PASSWORD, or RENAME USER, the server notices these changes and loads the grant tables into memory again immediately.

                  这篇关于MySQL:何时真正需要 MySQL 中的 Flush Privileges?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                  MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                  Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)
                  MySQL GROUP BY DateTime +/- 3 seconds(MySQL GROUP BY DateTime +/- 3 秒)

                  <tfoot id='yXLWn'></tfoot>

                  1. <small id='yXLWn'></small><noframes id='yXLWn'>

                      <tbody id='yXLWn'></tbody>

                      <legend id='yXLWn'><style id='yXLWn'><dir id='yXLWn'><q id='yXLWn'></q></dir></style></legend>
                      <i id='yXLWn'><tr id='yXLWn'><dt id='yXLWn'><q id='yXLWn'><span id='yXLWn'><b id='yXLWn'><form id='yXLWn'><ins id='yXLWn'></ins><ul id='yXLWn'></ul><sub id='yXLWn'></sub></form><legend id='yXLWn'></legend><bdo id='yXLWn'><pre id='yXLWn'><center id='yXLWn'></center></pre></bdo></b><th id='yXLWn'></th></span></q></dt></tr></i><div id='yXLWn'><tfoot id='yXLWn'></tfoot><dl id='yXLWn'><fieldset id='yXLWn'></fieldset></dl></div>

                            <bdo id='yXLWn'></bdo><ul id='yXLWn'></ul>