AnchovyLegend
AnchovyLegend

Reputation: 12538

Connect phpmyadmin to existing db server

I would like to access and modify records in an existing database server using phpmyadmin.

I am currently using the XAMPP testing server and can access the default localhost/phpmyadmin.

I tried to see if there is some config file I can point to the db server using the hostname, username, and password, i.e. C:\xampp\apache\conf\extra\httpd-xampp.conf however, I have not succeeded with that.

I was wondering if someone ever accomplished this task with phpmyadmin?

I appreciate any suggestions.

Many thanks in advance!

Upvotes: 5

Views: 6487

Answers (1)

Isaac Bennetch
Isaac Bennetch

Reputation: 12432

In this case you can add another server to config.inc.php, as long as the other MySQL server allows remote connections. The phpMyAdmin wiki has an example. Also, the included documentation has more in-depth information.

Basically you'll edit config.inc.php and add (or edit) the host value (and, if your auth_type is config, also the user and password values).

Here's a short example of how to do the multiserver, see the links I referenced for more details.

<?php 
$cfg['blowfish_secret'] = 'setthistosomethingelse';
$i = 0;  

$i++; // server 1
$cfg['Servers'][$i]['verbose']   = 'Development server';
$cfg['Servers'][$i]['host']      = 'localhost';

$i++; // server 2
$cfg['Servers'][$i]['verbose']   = 'Production server'; 
$cfg['Servers'][$i]['host']      = 'production.example.com';

?>

Upvotes: 2

Related Questions