Board index   FAQ   Search  
Register  Login
Board index php forum :: Database phpMyAdmin

Only one user

How to use phpmyadmin.... phpmyadmin related arguments. Even phpMyAdmin issues

Moderators: macek, egami, gesf

Only one user

Postby Directrix » Tue Nov 02, 2004 5:05 pm

Greetings to everyone!
Is it possible to configure phpMyAdmin to only allow one user with a specific username to log in? Or may be is there a php file where I could add some code?

Info: phpMyAdmin-2.6.0-pl2 (just uploaded)

Directrix
Directrix
New php-forum User
New php-forum User
 
Posts: 5
Joined: Tue Nov 02, 2004 4:58 pm

Postby Redcircle » Sat Nov 06, 2004 10:10 am

if on apache .htaccess and pw protect the dir.
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Postby Alexej Kubarev » Sat Nov 06, 2004 1:39 pm

If you mean that only one user will be able to login into phpMyAdmin then you only need to configure Users in phpMyAdmin..

Otherwise.... Redcircle is right..
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

Postby Directrix » Mon Nov 08, 2004 2:31 am

Thank you for your responses.

I never thought of using .htaccess, it would do the job. My actual problem is that the root user does not have a password, and I am not the admin, so I can't change that. So anybody could log in and do whatever they want too. One user was set up with a password, this is the only user I want to use through phpMyAdmin.

Would it be a solution to add this to the top of index.php?
Code: Select all
<?php
if (isset($_REQUEST['pma_username']))
{
          if ($_REQUEST['pma_username'] != 'myuser')
          {
                    unset($_POST);
                    unset($_REQUEST);
                    header("Location: http://fullpath/index.php");
                    die();
          }
}
?>


**I tested my code and it works, but I'm not sure whether it can be bypassed.
Directrix
New php-forum User
New php-forum User
 
Posts: 5
Joined: Tue Nov 02, 2004 4:58 pm

Postby Alexej Kubarev » Mon Nov 08, 2004 8:27 am

I think it might do the job :)
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län


Return to phpMyAdmin

Who is online

Users browsing this forum: No registered users and 0 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.