From ebcd98e31dc3fa6015493202599f75c38328ba8e Mon Sep 17 00:00:00 2001
From: "Alexander M. Turek"
Date: Tue, 25 Mar 2003 12:41:09 +0000
Subject: [PATCH] Fixed GRANT queries for the controluser.
---
ChangeLog | 5 +++-
Documentation.html | 63 ++++++++++++++++++++++++++++------------------
2 files changed, 43 insertions(+), 25 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 391838bfe..e5a523a91 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
+2003-03-25 Alexander M. Turek
+ * Documentation.html: Fixed GRANT queries for the controluser.
+
2003-03-25 Marc Delisle
* main.php3: replace the 'USE mysql' test, as users with a global
priv like CREATE TEMPORARY TABLES can do a 'USE mysql'
@@ -33,7 +36,7 @@ $Source$
2003-03-23 Marc Delisle
* libraries/sqlparser.lib.php3, libraries/config_import.lib.php3,
- config.inc.php3, Documentation.html: disabling of the parser no
+ config.inc.php3, Documentation.html: disabling of the parser no
longer possible
2003-03-22 Alexander M. Turek
diff --git a/Documentation.html b/Documentation.html
index a28b80794..9c2298cb9 100755
--- a/Documentation.html
+++ b/Documentation.html
@@ -241,23 +241,38 @@
GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
-GRANT SELECT (Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv,
- Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv,
- Grant_priv, References_priv, Index_priv, Alter_priv)
- ON mysql.user TO 'pma'@'localhost';
+GRANT SELECT (
+ Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,
+ Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,
+ File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,
+ Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv,
+ Execute_priv, Repl_slave_priv, Repl_client_priv
+ ) ON mysql.user TO 'pma'@'localhost';
GRANT SELECT ON mysql.db TO 'pma'@'localhost';
+GRANT SELECT ON mysql.host TO 'pma'@'localhost';
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
ON mysql.tables_priv TO 'pma'@'localhost';
+
+ If you are using an old MySQL version (below 4.0.2), please use this
+ query instead of the second one:
+
-
+GRANT SELECT (
+ Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,
+ Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,
+ File_priv, Grant_priv, References_priv, Index_priv, Alter_priv
+ ) ON mysql.user TO 'pma'@'localhost';
+
... and if you want to use the many new relation and bookmark
features:
GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db> TO 'pma'@'localhost';
-(this of course requires you to have a special DB for
-phpMyAdmin, the contents will be explained later)
+ (this of course requires you to have a special DB for phpMyAdmin, the
+ contents will be explained later)
+ Of course, the above queries only work if your MySQL version supports
+ the GRANT command. This is the case since 3.22.11.
Then each of the true users should be granted a set of
@@ -2223,8 +2238,8 @@ To create a new, empty mimetype please see libraries/transformations/template_ge
SetOutputFilter PHP
SetInputFilter PHP
-
- &
+
+ &
AddType application/x-httpd-php .php
@@ -2238,8 +2253,8 @@ To create a new, empty mimetype please see libraries/transformations/template_ge
#SetOutputFilter PHP
#SetInputFilter PHP
-
-
+
+
[2. Configuration]
@@ -2334,20 +2349,20 @@ To create a new, empty mimetype please see libraries/transformations/template_ge
- [2.6] I get an "Access denied for user: 'root@localhost' (Using
+ [2.6] I get an "Access denied for user: 'root@localhost' (Using
password: YES)"-error when trying to access a MySQL-Server on a
host which is port-forwarded for my localhost
- When you are using a port on your localhost, which you redirect via
+ When you are using a port on your localhost, which you redirect via
port-forwarding to another host, MySQL is not resolving the localhost
as expected.
- Erik Wasser explains: The solution is: if your host is "localhost"
- MySQL (the commandline tool 'mysql' as well) always tries to use the socket
- connection for speeding up things. And that doesn't work in this configuration
+ Erik Wasser explains: The solution is: if your host is "localhost"
+ MySQL (the commandline tool 'mysql' as well) always tries to use the socket
+ connection for speeding up things. And that doesn't work in this configuration
with port forwarding.
- If you enter "127.0.0.1" as hostname, everything is right and MySQL uses the
- TCP connection.
+ If you enter "127.0.0.1" as hostname, everything is right and MySQL uses the
+ TCP connection.
@@ -2989,15 +3004,15 @@ To create a new, empty mimetype please see libraries/transformations/template_ge
Since phpMyAdmin 2.5.0 you are also able to store variables for the bookmarks. Just use the string
/*[VARIABLE]*/ anywhere in your query. Everything which is put into the value input
- box on the query box page will replace the string "/*[VARIABLE]*/" in your stored query.
- Just be aware of that you HAVE to create a valid query, otherwise your query won't be even able to be
+ box on the query box page will replace the string "/*[VARIABLE]*/" in your stored query.
+ Just be aware of that you HAVE to create a valid query, otherwise your query won't be even able to be
stored in the database.
Also remember, that everything else inside the /*[VARIABLE]*/ string for your query will remain
the way it is, but will be stripped of the /**/ chars. So you can use:
/*, [VARIABLE] AS myname */
which will be expanded to
, VARIABLE as myname
- in your query, where VARIABLE is the string you entered in the input box. If an empty string is
+ in your query, where VARIABLE is the string you entered in the input box. If an empty string is
provided, no replacements are made.
A more complex example. Say you have stored this query:
@@ -3011,8 +3026,8 @@ To create a new, empty mimetype please see libraries/transformations/template_ge
NOTE THE ABSENCE OF SPACES inside the "/**/" construct. Any spaces inserted there
will be later also inserted as spaces in your query and may lead to unexpected results especially when
using the variable expansion inside of a "LIKE ''" expression.
- Your initial query which is going to be stored as a bookmark has to yield at least one result row so
- you can store the bookmark. You may have that to work around using well positioned "/**/"
+ Your initial query which is going to be stored as a bookmark has to yield at least one result row so
+ you can store the bookmark. You may have that to work around using well positioned "/**/"
comments.
@@ -3276,7 +3291,7 @@ Mats Engstrom, Ian Davidson, Laurent Dhima, Kristof Hamann, Thomas Kläger,
Lubos Klokner, Martin Marconcini, Girish Nair, David Nordenberg, Andreas Pauley,
Bernard M. Piller, Laurent Haas, "Sakamoto", Yuval Sarna,
www.securereality.com.au, Alexis Soulard, Alvar Soome, Siu Sun, Peter Svec,
-Michael Tacelosky, Rachim Tamsjadi, Kositer Uros,
+Michael Tacelosky, Rachim Tamsjadi, Kositer Uros,
Luís V., Martijn W. van der Lee,
Algis Vainauskas, Daniel Villanueva, Vinay, Ignacio Vazquez-Abrams, Chee Wai,
Jakub Wilk, Thomas Michael Winningham, Vilius Zigmantas, "Manuzhai".