NYCPHP Meetup

NYPHP.org

[nycphp-talk] accessing phpmyadmin as different users

Hans Zaunere hans at nyphp.org
Fri Oct 17 14:52:34 EDT 2003



Nestor Florez wrote:

> I am trying to access phpmyadmin as diferent users by having a login webpage 
> that ask for the userid and password and then passing it to index.php. In the 
> config.inc.php I change the code to look like this:
> 
> $cfg['Servers'][$i]['user'] = $_GET['userid'];
> $cfg['Servers'][$i]['password'] = $_GET['pwd'];
> 
> But when I try this I get an error:
> ========================================================
> Error
> 
> MySQL said:
> 
> Access denied for user: 'ODBC at localhost' (Using password: NO)
> ========================================================
> 
> If I change the code to :
> =========================================
> $cfg['Servers'][$i]['user'] = 'view';
> $cfg['Servers'][$i]['password'] = 'view';
> =========================================
> 
> It works. This is the same userid and pwd I am passing from my login page
> 
> Any ideas?

Ehh, things aren't be passed around properly.

> This tool is great but it would much easier if we could set it up to allow for users to login 
> and according to their user and pwd they would have access to different DB's and tables 
> according to the permissions that were granted to them..

phpMyAdmin just got better :)

http://www.phpmyadmin.net/documentation/#setup  (look for 'Using authentication modes:' header)
http://www.phpmyadmin.net/documentation/#config  (look for controluser and auth_type config settings)
http://www.phpmyadmin.net/documentation/#faqmultiuser

HTH,
 H





More information about the talk mailing list