https://wiki.uniformserver.com/index.php?title=Coral:_mysql_edit_restricted_user&feed=atom&action=historyCoral: mysql edit restricted user - Revision history2024-03-28T21:06:59ZRevision history for this page on the wikiMediaWiki 1.41.0https://wiki.uniformserver.com/index.php?title=Coral:_mysql_edit_restricted_user&diff=6185&oldid=prevRic: Created page with "<div id="top" style="margin:0;padding: 0px 0px 0px 5px; color: #000; background-color: #FFFFEB; border: 1px solid darkslateblue;"><span id="top" style="margin:0;padding: 0px;font..."2011-11-12T13:40:57Z<p>Created page with "<div id="top" style="margin:0;padding: 0px 0px 0px 5px; color: #000; background-color: #FFFFEB; border: 1px solid darkslateblue;"><span id="top" style="margin:0;padding: 0px;font..."</p>
<p><b>New page</b></p><div><div id="top" style="margin:0;padding: 0px 0px 0px 5px; color: #000; background-color: #FFFFEB; border: 1px solid darkslateblue;"><span id="top" style="margin:0;padding: 0px;font-size:12px">'''''Coral'' :'''&nbsp; [[Coral: mysql intro|MySQL]] | [[Coral: mysql change password|Change password]] | [[Coral: mysql restore password|Restore password]] | [[Coral: mysql console|MySQL Console]] | [[Coral: mysql create delete database|Create delete Database]] | [[Coral: mysql create restricted user|Create Restricted User]] | [[Coral: mysql edit restricted user|Edit Restricted User]]</span></div><br />
<br />
{|style="margin-top:5px;"<br />
|-valign="top"<br />
|<br />
<span style="margin-bottom:5px;font-size:25px;color: #31799F;">MySQL Edit Restricted User</span><br />
<br />
There are three methods for editing a restricted user; you can use a command window, phpMyAdmin or UniController. UniController provides a convenient menu option described bellow. To use this option ensure the MySQL server is running otherwise a warning message is produced.<br />
<br />
<br />
__TOC__<br />
<br />
|<br />
{| cellpadding="0" cellspacing="0" style="margin-left:6px;margin-bottom:5px;padding-left:6px;padding-right:6px;font-size:11px;background-color: #FFFFEB;border: 1px solid darkslateblue;"<br />
|-<br />
|colspan="2" style="font-weight:bold;"| UniServer&nbsp;8-Coral<br />
|-<br />
|&nbsp;||[[Coral: Introduction|Home]]<br />
|-<br />
|&nbsp;||[[Coral: start quick start|Quick Start]]<br />
|-<br />
|&nbsp;||[[Coral: general intro|General]]<br />
|-<br />
|&nbsp;||[[Coral: apache intro|Apache]]<br />
|-<br />
|<span style="font-size: 14px;">ยป</span>||[[Coral: mysql intro|MySQL]]<br />
|-<br />
|&nbsp;||[[Coral: php intro|PHP]]<br />
|-<br />
|&nbsp;||[[Coral: msmtp intro|MSMTP]]<br />
|-<br />
|&nbsp;||[[Coral: cron intro|CRON]]<br />
|-<br />
|&nbsp;||[[Coral: dtdns intro|DtDNS]]<br />
|-<br />
|&nbsp;||[[Coral: dbbackup intro|Db Backup]]<br />
|-<br />
|&nbsp;||[[Coral: perl intro|Perl]]<br />
|-<br />
|&nbsp;||[[Coral: index main|Main Index]]<br />
|}<br />
|}<br />
<br />
==Edit Restricted MySQL User using UniController==<br />
<span style="padding:6px;background-color:#99FFFF"> Server Configuration > MySQL > Edit Restricted MySQL User</span><br />
<br />
{|<br />
|-valign="top"<br />
|<br />
'''''Edit Restricted User'''''<br />
<br />
* 1) Select user to edit from the list, which populates the upper form<br />
* 3) Enter the old or a new password for the user<br />
* 5) Select or deselect user privileges as required<br />
* 6) Click "Update User" button<br />
<br />
'''''Delete Restricted User'''''<br />
<br />
* 1) Select user to be deleted from the list.<br />
* 7) Click "Delete" button<br />
<br />
Note 1: Cancel (8) and (9) clear both the edit fields and the user selection.<br />
|<br />
[[Image:Coral_mysql_edit_restricted_user.gif]]<br />
|}<br />
<br />
'''''[[#top | Top]]'''''<br />
==Edit Restricted MySQL User using phpMyAdmin==<br />
<br />
Start UniController and start both servers, then click phpMyAmin button. To edit a restricted user, proceed as follows:<br />
<br />
Note: Assume the user '''fred''' has already been created.<br />
<br />
{|<br />
|-valign="top"<br />
|<br />
When first started the phpMyAdmin home page is displayed; you can<br />
always return to this page by clicking the home icon (1)<br />
<br />
* 1) If not at the home page, click '''home icon'''<br />
* 2) From the top menu bar, select '''Privileges'''<br />
* 3) Under "Action", Click '''Edit Privileges'''<br />
<br />
The '''Edit Privileges: User 'fred'@'localhost'''' page is displayed. <br /><br />
From this page you can change the user privileges, the database(s) <br /><br />
the user is assigned to and privileges, password and login information.<br />
|<br />
[[Image:Coral_mysql_eru_phpmyadmin1.gif]]<br />
|}<br />
<br />
'''''[[#top | Top]]'''''<br />
==Edit Restricted MySQL User using command window==<br />
Editing an existing user with restricted privileges can be performed using the MySQL Client.<br />
<br />
You can use REVOKE to remove some or all privileges or alternatively use GRANT to add additional privileges. This example assumes a user fred has been created with the privileges GRANT SELECT, INSERT, UPDATE, DELETE assigned on database wordpress.<br />
You can revoke (remove) privileges; for example, the following command removes INSERT, UPDATE and DELETE.<br />
<br />
* REVOKE INSERT, UPDATE, DELETE ON wordpress.* FROM 'fred'@'localhost' ;<br />
<br />
You can grant (add) privileges; for example, the following command adds INSERT and UPDATE.<br />
<br />
* GRANT INSERT, UPDATE ON wordpress.* TO 'fred'@'localhost' ;<br />
<br />
You can display the grants assigned with the following command:<br />
<br />
* SHOW GRANTS FOR 'fred'@'localhost';<br />
<br />
<br />
Example for the above commands. Click MySQL console, which opens a command window. Then we run the MySQL Client with the following commands:<br />
<br />
* mysql -uroot -proot<br />
* SHOW GRANTS FOR 'fred'@'localhost';<br />
* REVOKE INSERT, UPDATE, DELETE ON wordpress.* FROM 'fred'@'localhost' ;<br />
* SHOW GRANTS FOR 'fred'@'localhost';<br />
* GRANT INSERT, UPDATE ON wordpress.* TO 'fred'@'localhost' ;<br />
* SHOW GRANTS FOR 'fred'@'localhost';<br />
* exit<br />
<br />
The results are shown below. <br />
<pre><br />
C:\UniServer\usr\local\mysql\bin>mysql -uroot -proot<br />
<br />
mysql> SHOW GRANTS FOR 'fred'@'localhost';<br />
+-------------------------------------------------------------------------------------------------------------+<br />
| Grants for fred@localhost |<br />
+-------------------------------------------------------------------------------------------------------------+<br />
| GRANT USAGE ON *.* TO 'fred'@'localhost' IDENTIFIED BY PASSWORD '*F5F0B28BD93FCF0C77FD96BB97BBC745ED8EA6BC' |<br />
| GRANT SELECT, INSERT, UPDATE, DELETE ON `wordpress`.* TO 'fred'@'localhost' |<br />
+-------------------------------------------------------------------------------------------------------------+<br />
2 rows in set (0.00 sec)<br />
<br />
mysql> REVOKE INSERT, UPDATE, DELETE ON wordpress.* FROM 'fred'@'localhost' ;<br />
Query OK, 0 rows affected (0.02 sec)<br />
<br />
mysql> SHOW GRANTS FOR 'fred'@'localhost';<br />
+-------------------------------------------------------------------------------------------------------------+<br />
| Grants for fred@localhost |<br />
+-------------------------------------------------------------------------------------------------------------+<br />
| GRANT USAGE ON *.* TO 'fred'@'localhost' IDENTIFIED BY PASSWORD '*F5F0B28BD93FCF0C77FD96BB97BBC745ED8EA6BC' |<br />
| GRANT SELECT ON `wordpress`.* TO 'fred'@'localhost' |<br />
+-------------------------------------------------------------------------------------------------------------+<br />
2 rows in set (0.00 sec)<br />
<br />
mysql> GRANT INSERT, UPDATE ON wordpress.* TO 'fred'@'localhost' ;<br />
Query OK, 0 rows affected (0.01 sec)<br />
<br />
mysql> SHOW GRANTS FOR 'fred'@'localhost';<br />
+-------------------------------------------------------------------------------------------------------------+<br />
| Grants for fred@localhost |<br />
+-------------------------------------------------------------------------------------------------------------+<br />
| GRANT USAGE ON *.* TO 'fred'@'localhost' IDENTIFIED BY PASSWORD '*F5F0B28BD93FCF0C77FD96BB97BBC745ED8EA6BC' |<br />
| GRANT SELECT, INSERT, UPDATE ON `wordpress`.* TO 'fred'@'localhost' |<br />
+-------------------------------------------------------------------------------------------------------------+<br />
2 rows in set (0.00 sec)<br />
mysql> exit<br />
Bye<br />
<br />
</pre><br />
<br />
'''''[[#top | Top]]'''''<br />
[[Related topics]]<br />
<br />
[[Coral: mysql console|MySQL Console]] <br />
<br />
'''''[[#top | Top]]'''''<br />
<br />
----<br />
<br />
[[Category: Uniform Server 8-Coral]]</div>Ric