Spencer T. Spencer T. - 8 days ago 5
MySQL Question

How to change mysql max execution time for console

I'm attempting to migrate a database with a SQL file I was provided. However, running the source command returns me:


Fatal error: Maximum execution time of 300 seconds exceeded


This is straight from the MySQL console where I've executed the source command. It seems to be failing because the table has over 16 million lines of data. My question is, where is the mysql setting to increase max execution time? Everyone keeps suggesting php.ini settings, but this isn't through a browser...Any help would be greatly appreciated.

Answer

It's a PHP error, not mysql one. MySQL does not have a easy timer for query timeouts.

Fatal error: Maximum execution time of 300 seconds exceeded

note: read the comments on your own question and please do what brenjt says.