config.inc.php

How can I protect this file (config.inc.php) , This file have  a username and password  But it need to use for phpmyadmin
I am new for linux Thank you
teeraAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

steve918Commented:
If your worried about visitors to the site, they will get a blank page if they try to load /MyAdmin/config.inc.php
If your worried about other shell account users,  just set the auth_type variable to cookie or http instead of config
0
steve918Commented:
by setting the auth_type...
cookie/http
you'll have to login each time you open MyAdmin, but you won't have to store any passwords in the config file.

The best way to protect your passwords are to keep them out of your config files altogether.
0
steve918Commented:
Here's my config.inc.php, notice that it says "MySQL password (only needed with 'config' auth_type)

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sylvester-braveheartCommented:
Avoid using "config" type of authentication for "$cfg['Servers'][$i]['auth_type']" because it will force you to input a password in config.inc.php.
I will recommend the "cookie" or "http" type ... the "cookie" model is easier to setup
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.