简体   繁体   中英

How to read .sql file by dictionary on MacOS?

I got error 2 when exec sql file by dictionary

I tried to exec mysql file on Mac OS at this dictionary: "/Users/kato/Desktop/world_mysql_script.sql"

source /Users/kato/Desktop/world_mysql_script.sql;

Then I got this error: Failed to open file '/Users/kato/Desktop/world_mysql_script.sql', error: 2

Do you have any solution? 1.

Please try to use mysql command.

mysql -u DB_USER -p -h DB_HOST DB_NAME < /Users/kato/Desktop/world_mysql_script.sql

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM