Import a mysql database using mysql command line -


i wondering if it's possible import mysql database using mysql command line.

most solutions give mysql -u root -p nameofdatabase < mysqlfile.sql

i wondering if it's possible inside mysql commmand line, instead of passing arguments executable.

if

 mysql> mydatabase < mysqlfile.sql; 

that doesn't work. thank you.

did mean this?

mysql> use nameofdatabase; mysql> set autocommit=0 ; source the_sql_file.sql ; commit ; 

the important part, looking for, source command. switch off autocommit because of execution time.


Comments

Popular posts from this blog

java - Ebean enhancement ignores a model -

javascript - Reference error while trying to encapsulate an animation function -

SQL php on different pages to Insert (mysqli) -