NYCPHP Meetup

NYPHP.org

[nycphp-talk] accessing phpmyadmin as different users

Nestor Florez nestorflorez at earthlink.net
Fri Oct 17 15:14:57 EDT 2003


Hans,


Thanks for your info.  Maybe what I need to do is to installed the latest phpmyadmin, because I am using 2.3.3
and this version does not have a login page, you just go directly into web form that allows you to be view databases and tables according to the values in the has:
$cfg['Servers'][$i]['user']          = 'user';      // MySQL user
$cfg['Servers'][$i]['password']      = 'pwd'; // MySQL password

Thanks again,

Nestor :-)



-----Original Message-----
From: Hans Zaunere <hans at nyphp.org>
Sent: Oct 17, 2003 11:52 AM
To: NYPHP Talk <talk at lists.nyphp.org>
Subject: Re: [nycphp-talk] accessing phpmyadmin as different users



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


_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk






More information about the talk mailing list