Skip to content

Instantly share code, notes, and snippets.

@jessekanner
Created March 30, 2023 00:13
Show Gist options
  • Select an option

  • Save jessekanner/841c1ea619ccf6479800fac30a30ab81 to your computer and use it in GitHub Desktop.

Select an option

Save jessekanner/841c1ea619ccf6479800fac30a30ab81 to your computer and use it in GitHub Desktop.
MySQL: Create DB & User
CREATE DATABASE dbname;
USE dbname;
CREATE USER 'dbusr'@'localhost' IDENTIFIED WITH mysql_native_password BY 'xxxxxxxxxxxxxxxxx';
GRANT ALL PRIVILEGES ON dbname.* TO dbusr@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment