Skip to content

Instantly share code, notes, and snippets.

@KannarFr
Created January 8, 2019 16:47
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 KannarFr/375743702533d00ee5ce3969f26b5f93 to your computer and use it in GitHub Desktop.
Save KannarFr/375743702533d00ee5ce3969f26b5f93 to your computer and use it in GitHub Desktop.
mysql --database="mysql" --execute="GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '$(cat .my.cnf | tail -n1 | cut -d'=' -f2)' WITH GRANT OPTION; FLUSH PRIVILEGES;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment