How to import database using command line in MySQL

How to import database using command line in MySQL

Use the following command to import database using command line in MySQL :

mysql -u username -p password database_name < physical location of the file

Another very simple example :

mysql > Use database_name;

mysql> source C:\Users\mydatabase.sql(path of the file you want to import);


Advertisements

Add Comment

📖 Read More