Solved

apache

Posted on 2004-04-13
4
310 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

810 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