Restore mysql backup file (SOLVED)


#1

Hi, is it possible to restore a backup file of the mysql database previously saved in text format?

I use this function that work fine but in exeoutput i do not have result.

Blockquote
$link = mysqli_connect(“localhost”, “root”, “password”, “_db_name”);
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$query = file_get_contents($path_txt_file);
mysqli_multi_query($link, $query);
mysqli_close($link);


#2

First, check whether $query contains some valid data.


#3

Error in a query…
Thanks gdgsupport