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
Post a Comment