How can I import a database with mysql from terminal?
I cannot find the exact syntax.
解决方案
Assuming you're on a Linux or Windows console:
Prompt for password:
mysql -u -p <
Enter password directly (not secure):
mysql -u -p <
Example:
mysql -u root -p wp_users < wp_users.sql
mysql -u root -pPassword123 wp_users < wp_users.sql
See also:
Note: If you are on windows then you will have to cd (change directory) to your MySQL/bin directory inside the CMD before executing the command.