RedCairo
RedCairo

Reputation: 11

In phpMyAdmin, how to enter 'remote' MySQL info (not local)?

background:

  1. There is a Q on this in the SE history but the comment-link is 404. How to setup/map remote mysql db in local phpmyadmin

  2. The answer to this sort-of (I apparently do not understand it correctly) is in the phpMyAdmin documentation http://phpmyadmin.readthedocs.org/en/latest/config.html#server-connection-settings

I have a remote MySQL on a typical Apache shared public webserver (with WordPress and SimpleMachines involved with it online). I want to be able to connect to my remote databases, clone (or whatever the word) that structure on my local (windows8) machine, and then do an official full backup (which I hope to restore, after re-installing s/w) of my MySQL online databases.

What I did so far:

Installed Uniserver Zero XI including phpMyAdmin.

In the phpMyAdmin files, I opened config.inc.php and I see the

/* Servers configuration */

$i = 0;

/* Server: localhost [1] */

$i++;

/* Authentication section / / Server parameters */

the latter two followed by many lines with iterative reference and settings, such as:

$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method 
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user

etc.

Docs say to just copy the whole server block part(s) and put in settings, for additional servers. Sounds easy enough.

When I do this, phpMyAdmin doesn't even open anymore (in the browser window), just a white screen. When I delete the added blocks of text, it's fine again.

I was putting the new block below the existing block. Am I putting it in the wrong place? Is there someplace where it should be outside or after the 'iterative loop' for numbering (where would that be)?

Or is there something I should do up in the first two lines with the i's?

I apologize for my ignorance, but, that's why I have a question. The documentation seems to assume I know, and googling finds me 10 gazillion hits unrelated, except the one former SE question with a link that was 404.

Upvotes: 1

Views: 720

Answers (1)

Isaac Bennetch
Isaac Bennetch

Reputation: 12442

What is the name of your config file and location on your disk?

The first line, before what's already there, should be <?php. The variable $port_ini doesn't seem to be set nor is this standard phpMyAdmin usage, so I would hardcode the port number here (I'm assuming it's nonstandard since you've included it in the configuration, if it is the default 3306 you can just remove that line entirely).

Same thing with $password, unless you've actually defined that somewhere and modified phpMyAdmin to use your new variable name that isn't a defined variable yet and is very possibly the cause of your trouble; hard code the password here (or better yet, switch to auth_type cookie and remove the user and password lines entirely).

Check your webserver error log for details; if it's logging errors you should see a lot more detail there about what is causing the exact problem.

Upvotes: 1

Related Questions