($fp = fopen($filename, 'r')) OR die('failed to open file:'.$filename) ĭie(' previous error: '.file_get_contents($errorFilename)) Mysql_select_db($dbName) OR die('select db: '.$dbName.' failed: '.mysql_error()) Mysql_connect($dbHost, $dbUser, $dbPass) OR die('connecting to host: '.$dbHost.' failed: '.mysql_error()) $errorFilename = $filename.'_error' // tmp file for erro $progressFilename = $filename.'_filepointer' // tmp file for progress $maxRuntime = 8 // less then your max script execution limit В noLimitDumpRestore.на PHP: // your config An easy way to do this is to create a file named data.sql: When we run the project with this file on the classpath, Spring will pick it up and use it for populating the database. 'MySQL Password:NOTSHOWNMySQL Host Name:'. Please make sure the import file is saved in the same folder as this script and check your values:MySQL Database Name:'. '' Įcho 'There was an error during import. MySQL Import Filename: dbbackupmember.sql Please make sure the import file is saved in the same folder as this script and check your values: To do so, create a text file textfile that contains the statements you wish. However, it is also possible to put your SQL statements in a file and then tell mysql to read its input from that file.
The mysql client typically is used interactively, like this: Press CTRL+C to copy.