[Phpmyadmin-devel] function similar to PMA_DBI_connect for remote server connection?
Marc Delisle
marc at infomarc.info
Sun Jul 5 13:04:28 CEST 2009
Tomas Srnka a écrit :
> Hello,
>
> is there a function similar to PMA_DBI_connect, which can connect to a
> remote MySQL server?
>
> I need to connect from slave server to master server and get current
> master binary log name and position for correct slave start.
>
> Thank you,
>
> Tomas
Hello Tomas,
this function connects to the MySQL server defined in
$GLOBALS['cfg']['Server']. It could be modified to add a 4th parameter
$special_server which would have a mixed type: by default it would be
false, meaning to use $GLOBALS['cfg']['Server'], but you could pass it
an array defining the "other" server you want to connect to.
When you write "from slave server to master server" I don't understand.
Connections are always done from the web server to some MySQL server.
--
Marc Delisle
http://infomarc.info
More information about the Developers
mailing list