"The shell stopped unexpectedly and Explorer.exe was restarted."
met verschillende users enzo...
I'm an ISP. Can I setup one central copy of phpMyAdmin or do I need to install it for each customer?
Since version 2.0.3, you can setup a central copy of phpMyAdmin for all your users. The development of this feature was kindly sponsored by NetCologne GmbH.
This requires a properly setup MySQL user management and phpMyAdmin's advanced authentication. phpMyAdmin performs these steps, when authenticating a user:
Select all entries from the mysql.user table where the username/password matches the challenging user. If no rows are returned, the authentication has failed. Otherwise, phpMyAdmin continues with step 2.
If the user's global Select_Priv is "N" (ie the user is not allowed to access all databases), phpMyAdmin searches the mysql.db table for entries with Select_Priv = "Y" belonging to the user. If no entries are found, the authentication has failed. Otherwise, phpMyAdmin shows all databases the user is allowed to view.
If the user's global Select_Priv is "Y", all databases in the system are shown.
This means that you need to add a user to the mysql database as following:
INSERT INTO user (Host, User, Password, 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) VALUES ('localhost', 'foo', PASSWORD('bar'), 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N')
INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Grant_priv, References_priv, Index_priv, Alter_priv) VALUES ('localhost', 'foo_db', 'foo', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '', '', '')
Then only the "foo_db" database will be displayed to user "foo".
Programmer - an organism that turns coffee into software.
"The shell stopped unexpectedly and Explorer.exe was restarted."
Verwijderd
Omdat ik meerdere gebruikers heb die elk hun eigen DB hebben, wil ik PHPMyAdmin gebruiken in een multiuser configuratie.
Ik heb een aantal gebruikers en databases aangemaakt zoals in de MySQL Documentatie staat:
1
2
3
4
5
6
7
8
9
10
11
12
13
| mysql> INSERT INTO user (Host,User,Password)
-> VALUES('%','jcapraro',PASSWORD('********'));
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_p
riv,Create_priv,Drop_priv)
-> VALUES ('%','ucms','jcapraro','Y','Y','Y','Y','Y','Y');
Query OK, 1 row affected (0.03 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.06 sec)
mysql> |
Bij PHPMyAdmin heb ik ook de stappen voor 'http' authenticationn mn.:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| mysql> GRANT USAGE ON mysql.* TO pma@localhost IDENTIFIED BY '********';
Query OK, 0 rows affected (0.01 sec)
mysql> 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;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT SELECT ON mysql.db TO pma@localhost;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT SELECT ON mysql.host TO pma@localhost;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
-> ON mysql.tables_priv TO pma@localhost;
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES; |
Als die users nu willen inloggen kunnen ze 3x een pass intypen dan zegt ie dat login/password incorrect is.
Enkel root kan momenteel inloggen met zijn paswoord.
Toen ik de Control User "pma" had gemaakt, kreeg die een access denied error in PHPMyAdmin...
Hoe komt dit eigenlijk? Moet ik soms een aantal uren wachten vooral die veranderingen (nieuwe users) door MySQL geaccepteerd worden? Het is nogal vaag en ik vind er geen informatie over terug in de documentatie van MySQL
[ Voor 7% gewijzigd door Verwijderd op 05-07-2003 13:08 . Reden: Paswoordje eruit :p ]
[ Voor 6% gewijzigd door curry684 op 05-07-2003 13:23 ]
Dit topic is gesloten.
![]()