How to use the command line to import SQL files in MySQL
- How-Tos FAQs
- December 16, 2018

4 Easy Steps on how to use the command line to import SQL files in MySQL
Import a SQL file in MySQL
Below is the screenshot of importing create_tables.sql SQL file located at “D:\” drive in “sakila” Database.
- Open MySQL Command Line
- Insert the user name and the password
- mysql > use your_database;
- mysql > source file_path_with_file_name.sql
And that’s how to use the command line to import SQL files in MySQL!
Up Next:
Read How to return data which contains multiple words in SQL?