Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to import 641 MB MySQL database with a command:

mysql -u root -p ddamiane_fakty < domenyin_damian_fakty.sql

but I got an error:

ERROR 1064 (42000) at line 2351406: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<br />
<b>Fatal error</b>:  Maximum execution time of 300 seconds exceeded in <b' at line 253

However limits are set much higher:

mysql> show global variables like "interactive_timeout";
+---------------------+-------+
| Variable_name       | Value |
+---------------------+-------+
| interactive_timeout | 28800 |
+---------------------+-------+
1 row in set (0.00 sec)

and

mysql> show global variables like "wait_timeout";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| wait_timeout  | 28800 |
+---------------+-------+
1 row in set (0.00 sec)
share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

It seems to me that your .sql file actually contains the text <br /> <b>Fatal error</b>: Maximum execution time of 300 seconds exceeded in <b, which is obviously not valid sql. You have possibly exported your database with some tool like phpMyAdmin, which took longer than 300s to create the export which was cut short at that point in time.

share|improve this answer
add comment

This is a syntax error in the .sql file. There should be a line there with "<b>Fatal error: Maximum execution time of 300 seconds exceeded in

This error looks alot like a PHP error to me. During database export/dump, php stopped after 300 seconds, and wrote out the error to its output -> your file.

You should fix php.ini, to allow longer execution time, then export the whole database to a new file, and then import the new file (I guess the database was exported via PHP ofcourse). Or use some other tool to dump the databse (like mysqldump, or mysql-workbench if your prefer a GUI), and import that.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.