Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two servers (ubuntu 10.04 amd 64). one i plan on the webserver, the other i plan on being the database server. The webserver is the only server with access to the outside world. I installed a LAMP stack with phpmyadmin. On the database server, in mysql i created a user with the host of the internal ip address of the webserver. On the webserver I edited the config-db.php file to point the variable $dbserver to the internal ip address of the database server. When I go to the phpmyadmin page to login i should expect to login using the newly created user. I can't for the life of me get this setup to work.

share|improve this question

closed as unclear what you're asking by Jenny D, kasperd, Michael Hampton Sep 4 '14 at 20:44

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

What, exactly, is not working? What error messages are you receiving? What behavior are you experiencing? – Adrien Jun 30 '11 at 19:44
A detail blog: – Suresh Kamrushi Oct 9 '15 at 12:32

Are you setting up your phpmyadmin config correctly with the server's information you want to conect to? see the phpmyadmin wiki page:

It should be as simple as just typing in the SQL server's IP/domain.

Additionally you can specify a username and password in the config. But if the phpmyadmin webpage is accessible externally this would be a very bad idea as anyone who got to that page would have assess to your sql server.

share|improve this answer

Just add below lines to your “” file in the bottom:

$cfg['Servers'][$i]['host'] = 'HostName:port'; //provide hostname and port if other than default
$cfg['Servers'][$i]['user'] = 'userName';   //user name for your remote server
$cfg['Servers'][$i]['password'] = 'Password';  //password
$cfg['Servers'][$i]['auth_type'] = 'config';       // keep it as config

. You will get “Current Server:” drop down with both “” and one what you have provided with “$cfg['Servers'][$i]['host']” cam switch between the servers.

share|improve this answer
Please do not post shortened links. – Deer Hunter Sep 4 '14 at 6:49

You can also consider editing instead of config-db.php (like here:

In, there is your base host defined. You may add another one afterwards by inserting something like this:


// The $i counter should already be incremented, if not, uncomment the next line
// $i++;

$cfg['Servers'][$i]['host']          = '';        // MySQL hostname or IP address
$cfg['Servers'][$i]['port']          = '';        // MySQL port - leave blank for default port
$cfg['Servers'][$i]['connect_type']  = 'tcp';     // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension']     = 'mysqli';  // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['auth_type']     = 'cookie';  // Authentication method (valid choices: config, http, signon or cookie)

// 0 enables choosing host via a dropdown menu
// 1 sets the first one as default
// 2 sets the second one as default
// etc.
$cfg['ServerDefault']                = 0;
share|improve this answer
I don't feel like having enough expertise in this configuration to make definitive statements, but if that's preferred, I expand my answear with an example. – Kalmar Mar 9 '13 at 10:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.