phpMyAdmin voor meerdere gebruikers?

Pagina: 1
Acties:
  • 109 views sinds 30-01-2008

  • jelmervos
  • Registratie: Oktober 2000
  • Niet online

jelmervos

Simple user

Topicstarter
Even een vraagje. Ik wil graag 1 kopie van phpMyAdmin draaien voor meedere gebruikers. Dus dat de gebruiker moet inloggen om bij zijn MySQL database kunnen.

Iemand enig idee hoe dit in te stellen, zodat het een beetje normaal werkt?

"The shell stopped unexpectedly and Explorer.exe was restarted."


  • douweh
  • Registratie: Maart 2001
  • Laatst online: 20-08 18:34
Volgens mij staat dat wel in de config...
met verschillende users enzo...

  • LuCarD
  • Registratie: Januari 2000
  • Niet online

LuCarD

Certified BUFH

http://www.phpwizard.net/projects/phpMyAdmin/documentation.html
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.


  • jelmervos
  • Registratie: Oktober 2000
  • Niet online

jelmervos

Simple user

Topicstarter
Dat heb ik gedaan, maar dat werkt niet echt goed. Je krijgt wel zo'n inlog scherm, maar dan wil die user uitloggen, en komt hij gewoon weer terug. Dus niks uitloggen.

"The shell stopped unexpectedly and Explorer.exe was restarted."


Verwijderd

Op mijn Windows XP bak heb ik Apache 2.0.46, PHP 4.3.1 en MySQL 4.0.12 draaien.
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:

code:
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.:
code:
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 ]


  • curry684
  • Registratie: Juni 2000
  • Laatst online: 13-08 16:46

curry684

left part of the evil twins

Kick van een maand voor een nauwelijks gerelateerd probleem is wat nutteloos, en het heeft dan ook nog niets met Programming noch Webscripting van doen. Hier dicht omdat het een vervolgtopic is, begin in Software Algemeen maar een nieuwe :)

[ Voor 6% gewijzigd door curry684 op 05-07-2003 13:23 ]

Professionele website nodig?

Pagina: 1

Dit topic is gesloten.