Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deviousway/0488afcd3beb7c44412795b865594bbd to your computer and use it in GitHub Desktop.
Save deviousway/0488afcd3beb7c44412795b865594bbd to your computer and use it in GitHub Desktop.
mysql export users with privileges and password
#on old
mysqldump -udebian-sys-maint -p$PASSWORD mysql user > user_table_dump.sql
#on new
mysql -udebian-sys-maint -p$PASSWORD mysql < user_table_dump.sql
#login to mysql
mysql> flush privileges;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment