You could have large database that is taking longer than your server maximum time to execute a mysql script.

If this is correct then you have to allow more time to execute such commands.