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

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -