Search code examples
mysql

How to import an SQL file by using mysqldump on Windows through command line


How do I import an SQL file to MySQL dump using command line. I am using windows.


Solution

  • Navigate to the directory where you have mysql and issue this command, changing the bold values to your file/database locations.

    c:\mysql\bin\> mysql -u USERNAME -p PASSWORD database_name < filename.sql