# Why does MySQL shut down when importing data with the source command? This crash most often occurs when you use the `source` command to import large amounts of data, since it can only execute a limited amount of queries. Instead, we recommend you use the MySQL `import` command to import large amounts of data. For more detailed steps, see [How to Import MySQL Databases into DigitalOcean Managed Databases](https://docs.digitalocean.com/products/databases/mysql/how-to/import-databases/index.html.md) . ## Related Topics [How do I fix the mysqldump "Couldn't execute FLUSH TABLES Access denied" error?](https://docs.digitalocean.com/support/how-do-i-fix-the-mysqldump-couldnt-execute-flush-tables-access-denied-error/index.html.md): Update backup user permissions, remove the –single-transaction flag, or downgrade mysqldump. [How do I fix the "1227" error?](https://docs.digitalocean.com/support/how-do-i-fix-the-1227-error/index.html.md): Remove or replace the DEFINER in the dump file. [How do I fix the "Out of sort memory" error?](https://docs.digitalocean.com/support/how-do-i-fix-the-out-of-sort-memory-error/index.html.md): Adjust the sort\_buffer\_size value while assessing its impact on memory consumption and query performance.