0

Possible Duplicate:
connect to external server by using php myAdmin

My web host provides databases on separate servers, so "localhost" isn't an option for me. How do I setup phpMyAdmin configuration storage to use an external server?

I tried: $cfg['Servers'][$i]['pmadb'] = 'dbname.dbserver.host.com'; and $cfg['Servers'][$i]['pmadb'] = 'dbname@dbserver.host.com';

but those did not work. Any suggestions?

Here's my setup...
FreeBSD 7.3-RELEASE-p2
Apache/2.2.22
MySQL 5.0.91-log
mysqlnd 5.0.8-dev
phpMyAdmin 3.5.2.1
using config authentication

I put the setup for my configuration database into a config block for a regular, non-configuration database in config.inc.php and it works fine using something like this:

$cfg['Servers'][$i]['verbose'] = 'pma';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'dbuser';
$cfg['Servers'][$i]['password'] = 'dbpass';
$cfg['Servers'][$i]['only_db'] = array('dbname');
$cfg['Servers'][$i]['host'] = 'dbserver.host.com';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['extension'] = 'mysqli';
Community
  • 1
  • 1
perfectweb
  • 59
  • 1
  • 7

1 Answers1

0
$cfg['Servers'][$i]['host'] = 'dbserver.host.com'; // use host (I removed dbname.)

EDIT 1

test direct connection:

mysql --host=dbserver.host.com --user=*** --password=***

Your setup should be work. Otherwise ask for support. (need a SSL connection?, security certificate? etc)

Igor Parra
  • 10,214
  • 10
  • 69
  • 101
  • I tried it like this: `$cfg['Servers'][$i]['pmadb'] = 'dbname'; $cfg['Servers'][$i]['host'] = 'dbname.dbserver.host.com';` and then again without the 'pmadb' line, but neither worked (quitting browser each time). I still get `$cfg['Servers'][$i]['pmadb'] ... not OK` – perfectweb Aug 09 '12 at 07:16
  • perfectweb: this is not so hard to solve. please add info about your server environment (ubuntu, centos, etc). for example if you use `/etc/phpmyadmin/config-db.php` (ubuntu) maybe you must set `$dbserver`, in it. etc... – Igor Parra Aug 09 '12 at 15:41
  • I added my server setup to the question – perfectweb Aug 09 '12 at 18:32
  • Yes, I can direct connect to the server, but configuration storage is still not working with `$cfg['Servers'][$i]['host'] = 'dbserver.host.com';` – perfectweb Aug 15 '12 at 21:12