Solved

apache

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now