Import A Large SQL Dump File To A MySQL Database From Command Line
Import A Large SQL Dump File To A MySQL Database From Command Line
Import A Large SQL Dump File To A MySQL Database From Command Line
$PATH_TO_MYSQL\mysql.exe -u root -p
https://manios.org/2013/03/19/import-a-large-sql-dump-file-to-a-mysql-database-from-command-line 1/3
1/19/24, 10:10 PM Import a large sql dump file to a MySQL database from command line - cmanios
SET foreign_key_checks = 1;
SET UNIQUE_CHECKS = 1;
SET AUTOCOMMIT = 1;
If you are in Linux you can create a Bash script which will do the
dirty job and write to stdout start and end time of import:
#!/bin/sh
https://manios.org/2013/03/19/import-a-large-sql-dump-file-to-a-mysql-database-from-command-line 2/3
1/19/24, 10:10 PM Import a large sql dump file to a MySQL database from command line - cmanios
https://manios.org/2013/03/19/import-a-large-sql-dump-file-to-a-mysql-database-from-command-line 3/3