Skip to content

Instantly share code, notes, and snippets.

@031nna
Created May 11, 2018 19:25
Show Gist options
  • Save 031nna/08c261dc3644d73975e8ca439c408109 to your computer and use it in GitHub Desktop.
Save 031nna/08c261dc3644d73975e8ca439c408109 to your computer and use it in GitHub Desktop.
mysql commands

Prompt for password:

mysql -u <username> -p <databasename> < <filename.sql> Enter password directly (not secure):

mysql -u <username> -p<PlainPassword> <databasename> < <filename.sql> Example:

mysql -u root -p wp_users < wp_users.sql

mysql -u root -pPassword123 wp_users < wp_users.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment