Skip to content

Instantly share code, notes, and snippets.

@thephucit
Created March 2, 2020 10:59
Show Gist options
  • Save thephucit/38c98553f042a3a5b65cb8ae3feb6f3e to your computer and use it in GitHub Desktop.
Save thephucit/38c98553f042a3a5b65cb8ae3feb6f3e to your computer and use it in GitHub Desktop.
create admin user with all privileges on mysql/mariadb
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
## remote connection - not secure
CREATE USER 'admin'@'%' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment