It would be nice to export the complete database to a php file like:
<?php
// connection information
$ip = "***";
$user = "***";
$pass = "***";
$db_name = "***";
@MYSQL_CONNECT($ip,$user,$pass);
@MYSQL_SELECT_DB($db_name);
mysql_query("CREATE ........ ");
mysql_query("INSERT ........ ");
?>
So that I only have to insert the connection information. Than I can copy the hole file to the new webserver and execute it like.
http://www.newserver.de/tabelimport.php
Thanks very much.
NICE PROGRAM!!!!!!!!!!!!!!!!!!
Logged In: YES
user_id=326580
Originator: NO
why not install phpMyAdmin on new server? or add the DB on the new server to you current phpMyAdmin installation?
Logged In: YES
user_id=913645
Originator: NO
Installing phpMyAdmin on the other server would be the easiest solution. In the situation where one might want one installation to manage multiple servers can be complicated if two disjoint servers (from two different providers) block the port for mysql for external access. A workaround for this might be to encapsulated mysql protocol in http and have phpMyAdmin on network A and a simple protocol encapsulation php file on a server in network B. There would need to be some validation and security checks, but it would allow one installation to manage multiple disjoint locations where mysql port is blocked.
Logged In: YES
user_id=2086059
Originator: NO
In my mind, the best would be to export datas as PHP ARRAY !
--------------------- file : exported_data.php ----------------------
<?php
array(
'myDB' => array(
'firstTable' => array(
array(
'id' => 1,
'name' => 'foo',
'created_at' => '2008-07-06 05:04:03'
),
array(
'id' => 2,
'name' => 'xyz',
'created_at' => '2008-07-06 05:04:03'
),
array(
'id' =>3,
'name' => 'bar',
'created_at' => '2008-07-06 05:04:03'
),
),
'secondTable' => array(
array(
'id' =>3,
'name' => 'bar',
'created_at' => '2008-07-06 05:04:03'
),
),
),
);
-----------------------------------------------------------------------
It would be then easy to parse a database content, in PHP (instead of using CSV or XML as I actually do)
Logged In: YES
user_id=192186
Originator: NO
phpMyAdmin has plugin system for export, you are free to come with code for this one. I think thad addopting SQL export to handle this should be pretty easy.
Exporting as PHP arrays implemented in 3.3.0.