Search code examples
mysqlphpmyadminbackupdatabase-backups

Copying MySQL database fails due to maximum execution time


I tried copying my CiviCRM database which has around 160+ tables. It stopped mid way with an error "Max execution time 360 ... blah blah" couldnt read completely. Even my php.ini file has max execution time as 120. From where this picks up the value 360.? How do I copy the SQL file without any problem?


Solution

  • You can proceed by doing a DB backup with mysqldump command. You should be using mysql on CLI mode (CMD/MS Windows, Mac or Linux) to do so. The syntax is as below:

    mysqldump -u user -p --opt databasename > backup.sql
    

    Please refer to mysql documentation: https://dev.mysql.com/doc/refman/5.5/en/mysqldump.html