Solved

apache

Posted on 2004-04-13
4
311 Views
Last Modified: 2010-04-20
I Use Phpmyadmin how can I set password whrn go to page phpmyadmin I use apache
Thank
0
Comment
Question by:teera
  • 2
  • 2
4 Comments
 
LVL 6

Assisted Solution

by:karlwilbur
karlwilbur earned 175 total points
ID: 10813799
You could use an htaccess file. Maybe not the best choice but it's easy. It'd go a li'l somethin' like this.  And a one, and a two, and a one, two, three, four...

change to the dir you want to password protect

cat > .htaccess << "EOF"
AuthUserFile /etc/httpd-users
AuthGroupFile /etc/htttpd-groups
AuthName "Private Directory"
AuthType Basic
require valid-user
Options +Indexes
EOF

Now do the following as root:

(to create empty files)
touch /etc/httpd-users
touch /etc/httpd-groups

(to add users)
htpasswd -b /etc/httpd-users [username] [password]   ...(rinse and repeat)

-Karl
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 175 total points
ID: 10817630
I think that using the MySQL authentication is even simpler than that. Open your config.inc.php file and go to the section that defines your MySQL user id and password and change it to this:

$cfg['Servers'][$i]['auth_type']     = 'http';    // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user']          = '';      // MySQL user
$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed
                                                    // with 'config' auth_type)

You are changing the authentication method from config to http. This will automatically prompt you for your MySQL user ID and password.
0
 
LVL 6

Expert Comment

by:karlwilbur
ID: 10817655
I think your right.  That is even easier. :-)
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10817848
And if you believe the commends, you can even get rid of the last line :-)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question