privileges.html 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
  6. <title>User management &#8212; phpMyAdmin 5.2.2 documentation</title>
  7. <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
  8. <link rel="stylesheet" type="text/css" href="_static/classic.css" />
  9. <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
  10. <script src="_static/jquery.js"></script>
  11. <script src="_static/underscore.js"></script>
  12. <script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
  13. <script src="_static/doctools.js"></script>
  14. <script src="_static/sphinx_highlight.js"></script>
  15. <link rel="index" title="Index" href="genindex.html" />
  16. <link rel="search" title="Search" href="search.html" />
  17. <link rel="copyright" title="Copyright" href="copyright.html" />
  18. <link rel="next" title="Relations" href="relations.html" />
  19. <link rel="prev" title="Bookmarks" href="bookmarks.html" />
  20. </head><body>
  21. <div class="related" role="navigation" aria-label="related navigation">
  22. <h3>Navigation</h3>
  23. <ul>
  24. <li class="right" style="margin-right: 10px">
  25. <a href="genindex.html" title="General Index"
  26. accesskey="I">index</a></li>
  27. <li class="right" >
  28. <a href="relations.html" title="Relations"
  29. accesskey="N">next</a> |</li>
  30. <li class="right" >
  31. <a href="bookmarks.html" title="Bookmarks"
  32. accesskey="P">previous</a> |</li>
  33. <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
  34. <li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
  35. <li class="nav-item nav-item-this"><a href="">User management</a></li>
  36. </ul>
  37. </div>
  38. <div class="document">
  39. <div class="documentwrapper">
  40. <div class="bodywrapper">
  41. <div class="body" role="main">
  42. <section id="user-management">
  43. <h1>User management<a class="headerlink" href="#user-management" title="Permalink to this heading">¶</a></h1>
  44. <p>User management is the process of controlling which users are allowed to
  45. connect to the MySQL server and what permissions they have on each database.
  46. phpMyAdmin does not handle user management, rather it passes the username and
  47. password on to MySQL, which then determines whether a user is permitted to
  48. perform a particular action. Within phpMyAdmin, administrators have full
  49. control over creating users, viewing and editing privileges for existing users,
  50. and removing users.</p>
  51. <p>Within phpMyAdmin, user management is controlled via the <span class="guilabel">User accounts</span> tab
  52. from the main page. Users can be created, edited, and removed.</p>
  53. <section id="creating-a-new-user">
  54. <h2>Creating a new user<a class="headerlink" href="#creating-a-new-user" title="Permalink to this heading">¶</a></h2>
  55. <p>To create a new user, click the <span class="guilabel">Add user account</span> link near the bottom
  56. of the <span class="guilabel">User accounts</span> page (you must be a “superuser”, e.g., user “root”).
  57. Use the textboxes and drop-downs to configure the user to your particular
  58. needs. You can then select whether to create a database for that user and grant
  59. specific global privileges. Once you’ve created the user (by clicking Go), you
  60. can define that user’s permissions on a specific database (don’t grant global
  61. privileges in that case). In general, users do not need any global privileges
  62. (other than USAGE), only permissions for their specific database.</p>
  63. </section>
  64. <section id="editing-an-existing-user">
  65. <h2>Editing an existing user<a class="headerlink" href="#editing-an-existing-user" title="Permalink to this heading">¶</a></h2>
  66. <p>To edit an existing user, simply click the pencil icon to the right of that
  67. user in the <span class="guilabel">User accounts</span> page. You can then edit their global- and
  68. database-specific privileges, change their password, or even copy those
  69. privileges to a new user.</p>
  70. </section>
  71. <section id="deleting-a-user">
  72. <h2>Deleting a user<a class="headerlink" href="#deleting-a-user" title="Permalink to this heading">¶</a></h2>
  73. <p>From the <span class="guilabel">User accounts</span> page, check the checkbox for the user you wish to
  74. remove, select whether or not to also remove any databases of the same name (if
  75. they exist), and click Go.</p>
  76. </section>
  77. <section id="assigning-privileges-to-user-for-a-specific-database">
  78. <h2>Assigning privileges to user for a specific database<a class="headerlink" href="#assigning-privileges-to-user-for-a-specific-database" title="Permalink to this heading">¶</a></h2>
  79. <p>Users are assigned to databases by editing the user record (from the
  80. <span class="guilabel">User accounts</span> link on the home page).
  81. If you are creating a user specifically for a given table
  82. you will have to create the user first (with no global privileges) and then go
  83. back and edit that user to add the table and privileges for the individual
  84. table.</p>
  85. </section>
  86. <section id="configurable-menus-and-user-groups">
  87. <span id="configurablemenus"></span><h2>Configurable menus and user groups<a class="headerlink" href="#configurable-menus-and-user-groups" title="Permalink to this heading">¶</a></h2>
  88. <p>By enabling <span class="target" id="index-0"></span><a class="reference internal" href="config.html#cfg_Servers_users"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['users']</span></code></a> and
  89. <span class="target" id="index-1"></span><a class="reference internal" href="config.html#cfg_Servers_usergroups"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['usergroups']</span></code></a> you can customize what users
  90. will see in the phpMyAdmin navigation.</p>
  91. <div class="admonition warning">
  92. <p class="admonition-title">Warning</p>
  93. <p>This feature only limits what a user sees, they are still able to use all the
  94. functions. So this can not be considered as a security limitation. Should
  95. you want to limit what users can do, use MySQL privileges to achieve that.</p>
  96. </div>
  97. <p>With this feature enabled, the <span class="guilabel">User accounts</span> management interface gains
  98. a second tab for managing <span class="guilabel">User groups</span>, where you can define what each
  99. group will view (see image below) and you can then assign each user to one of
  100. these groups. Users will be presented with a simplified user interface, which might be
  101. useful for inexperienced users who could be overwhelmed by all the features
  102. phpMyAdmin provides.</p>
  103. <img alt="_images/usergroups.png" src="_images/usergroups.png" />
  104. </section>
  105. </section>
  106. <div class="clearer"></div>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  111. <div class="sphinxsidebarwrapper">
  112. <div>
  113. <h3><a href="index.html">Table of Contents</a></h3>
  114. <ul>
  115. <li><a class="reference internal" href="#">User management</a><ul>
  116. <li><a class="reference internal" href="#creating-a-new-user">Creating a new user</a></li>
  117. <li><a class="reference internal" href="#editing-an-existing-user">Editing an existing user</a></li>
  118. <li><a class="reference internal" href="#deleting-a-user">Deleting a user</a></li>
  119. <li><a class="reference internal" href="#assigning-privileges-to-user-for-a-specific-database">Assigning privileges to user for a specific database</a></li>
  120. <li><a class="reference internal" href="#configurable-menus-and-user-groups">Configurable menus and user groups</a></li>
  121. </ul>
  122. </li>
  123. </ul>
  124. </div>
  125. <div>
  126. <h4>Previous topic</h4>
  127. <p class="topless"><a href="bookmarks.html"
  128. title="previous chapter">Bookmarks</a></p>
  129. </div>
  130. <div>
  131. <h4>Next topic</h4>
  132. <p class="topless"><a href="relations.html"
  133. title="next chapter">Relations</a></p>
  134. </div>
  135. <div role="note" aria-label="source link">
  136. <h3>This Page</h3>
  137. <ul class="this-page-menu">
  138. <li><a href="_sources/privileges.rst.txt"
  139. rel="nofollow">Show Source</a></li>
  140. </ul>
  141. </div>
  142. <div id="searchbox" style="display: none" role="search">
  143. <h3 id="searchlabel">Quick search</h3>
  144. <div class="searchformwrapper">
  145. <form class="search" action="search.html" method="get">
  146. <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
  147. <input type="submit" value="Go" />
  148. </form>
  149. </div>
  150. </div>
  151. <script>document.getElementById('searchbox').style.display = "block"</script>
  152. </div>
  153. </div>
  154. <div class="clearer"></div>
  155. </div>
  156. <div class="related" role="navigation" aria-label="related navigation">
  157. <h3>Navigation</h3>
  158. <ul>
  159. <li class="right" style="margin-right: 10px">
  160. <a href="genindex.html" title="General Index"
  161. >index</a></li>
  162. <li class="right" >
  163. <a href="relations.html" title="Relations"
  164. >next</a> |</li>
  165. <li class="right" >
  166. <a href="bookmarks.html" title="Bookmarks"
  167. >previous</a> |</li>
  168. <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
  169. <li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
  170. <li class="nav-item nav-item-this"><a href="">User management</a></li>
  171. </ul>
  172. </div>
  173. <div class="footer" role="contentinfo">
  174. &#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
  175. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
  176. </div>
  177. </body>
  178. </html>