2

I can run the following commands:

C:\myfolder>mysql -uuser -ppassword 

Then from within the client do:

mysql>source C:\path\to\file.sql

Or I can do:

C:\myfolder>mysql -uuser -ppassword  < C:\path\to\file.sql

Is there a difference between these two commands? if so, what is it and when should I use each?

1 Answer 1

2

They are the same, but you can use only one depending in which environment you are.

for example when you are in DOS/ linux prompt you can only run mysql.exe

in Mysql command mode you only can use source.

so there is no need to change the environments to import the sql file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.