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

How can I connect to external MySQL server to which I have granted access for my IP. What I have is:

  1. A website FTP link (like: ftp.domain.com)

  2. MySQL username and password

  3. Granted access to the MySQL server from my IP

My question is what I need to do to connect it. I have a local web server with phpMyAdmin from which I want to be able to access this external phpMyAdmin.

share|improve this question

1 Answer 1

You need to edit your phpMyAdmin's config.inc.php file. Specifically, you need to add the new server.

For example:

$cfg['Servers'][$i]['verbose'] = 'mysqlserver.domain.com';
$cfg['Servers'][$i]['host'] = 'mysqlserver.domain.com';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';

As host, this can probably be either the FTP domain name or the one you use to access whatever service (website) you have installed - this depends on how your server was set up so if one doesn't work, try the other.

share|improve this answer
It says that it cannot login to mysql server... I'm testing it with my domain name or with ftp.domainname –  Moozy Aug 29 '12 at 12:50
Can you connect to the server from the commandline? If that doesn't work, then phpMyAdmin won't be able to connect either of course. –  brain99 Aug 29 '12 at 13:07

Your Answer


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.