Can't import a sql file exported from phpMyAdmin?

Up vote 0 down vote favorite share g+ share fb share tw.

Ok, this is the situation. I have backed up my database by going into phpMyAdmin and then, without selecting any database, clicking export. Now when I try importing the exported sql file into a fresh MySQL installation, I'm getting errors like pastebin.com/vDHdG2T6 (used pastebin as it's pretty long) I know I should have used mysqldump instead as it would skip the information_schema table.

Do you have any suggestions how to solve this or import that file without having to edit the million lines file? I've also tried importing the file like: mysql -u root -p -f -h localhost '; preg_match_all("/Database: `(.*? )`/", $data, $dbs); foreach ($dbs1 as $database){ echo "$database"; } echo ''; } else { $database = $_GET'db'; //only get the queries for that db $data = explode(PHP_EOL, $data); $buffer = array(); $buffer_started = false; foreach ($data as $key => $row){ if (preg_match("/Database: `.

*? `/", $row) && $buffer_started) { array_pop($buffer); break; } if (preg_match("/Database: `$database`/", $row)) { $buffer_started = true; continue; } if ($buffer_started) { array_push($buffer, $row); } unset($data$key); } echo ''. Implode("\n", $buffer).

''; } Save this as index. Php and put your sql into import. Sql in the same directory, it will list the databases found in file and just click on whichever you want and it will show the queries in a textarea.

Good luck. Mysql phpmyadmin link|improve this question edited Mar 9 at 15:47 asked Mar 9 at 13:45Julijan An? Eli?313.

– arnep Mar 9 at 13:51 1 When you create the export, If you want to remove the existing structure make sure drop tables is selected which will clear the existing structure/data from the DB when you import. If you don't want to lose the existing structure you may need to run truncate tables on each table in order to prevent duplicate entries. – Charles Weiss Mar 9 at 15:01 You can answer your own question and accept your answer if this is the route you took that worked for you.

– beanland Mar 22 at 15:09.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions