user2940867 user2940867 - 4 months ago 40
MySQL Question

Get output from mysql query file source

Can I retrieve output from mysql for the querys inside the file

after the import?

mysql --host=localhost --user="root" --password="123456" --database=mytest --execute="SOURCE /var/www/test/WebService/public/tmp/querys.sql"


Redirect the input of mysql to the file. To get the information messages like 1 row inserted, add the --verbose option.

mysql --verbose --host=localhost --user="root" --password="123456" --database=mytest < /var/www/test/WebService/public/tmp/querys.sql

You can get more messages by using multiple --verbose options.