Skip to content

Instantly share code, notes, and snippets.

@paul-ridgway
Created August 23, 2022 06:59
Show Gist options
  • Save paul-ridgway/77a3c30f545152e6d8287d8278d2c1bb to your computer and use it in GitHub Desktop.
Save paul-ridgway/77a3c30f545152e6d8287d8278d2c1bb to your computer and use it in GitHub Desktop.
Create a database and user with full access.
CREATE DATABASE database;
CREATE USER 'username'@'%' IDENTIFIED WITH authentication_plugin BY 'password';
# Or
CREATE USER 'username'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL ON database.* TO 'username'@'%';
FLUSH PRIVILEGES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment