Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
    
What, exactly, is not working? What error messages are you receiving? What behavior are you experiencing? –  Adrien Jun 30 '11 at 19:44
add comment

2 Answers

Are you setting up your phpmyadmin config correctly with the server's information you want to conect to? see the phpmyadmin wiki page: http://wiki.phpmyadmin.net/pma/Config#Server.28s.29_configuration

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
add comment

You can also consider editing config.inc.php instead of config-db.php (like here: http://www.mittalpatel.co.in/access_mysql_database_hosted_remote_server_using_phpmyadmin)

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

<?php

// 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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