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?
 
steve918Connect With a Mentor Commented:
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
 
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
 
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
All Courses

From novice to tech pro — start learning today.