This is the php script which help you to restore a dump of data into your database …
<?php
ini_set('memory_limit','128M'); // set memory limit here
$db = mysql_connect ( 'Your Host', 'Your Username', 'Your password' ) or die('not connected');
mysql_select_db( 'Your database', $db) or die('Not found');
$fp = fopen ( 'sql_dump.sql', 'r' );
$fetchData = fread ( $FP, filesize ( 'sql_dump.sql') );
$sqlInfo = explode ( ";\n", $fetchData); // explode dump sql as a array data
foreach ($sqlInfo AS $sqlData )
{
mysql_query ( $sqlData ) or die('Query not executed');
}
echo 'Done';
?>
Hope this will help you
Pingback: set up wordpress as demo site - DesignersTalk
Hi Thanks for you script. I had to run it using the multiquery_query. The other way kept telling me “Query not executed”