Skip to content

Instantly share code, notes, and snippets.

@eusonlito
Created August 31, 2021 20:16
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 eusonlito/b74e6611030e2a1ac4037f95bc8f2bf0 to your computer and use it in GitHub Desktop.
Save eusonlito/b74e6611030e2a1ac4037f95bc8f2bf0 to your computer and use it in GitHub Desktop.
Create a new MySQL database and user
CREATE DATABASE `DB` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE USER "USR"@"localhost" IDENTIFIED BY "PWD";
CREATE USER "USR"@"127.0.0.1" IDENTIFIED BY "PWD";
GRANT ALL ON `DB`.* TO "USR"@"localhost";
GRANT ALL ON `DB`.* TO "USR"@"127.0.0.1";
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment