Skip to content

Instantly share code, notes, and snippets.

@bonelifer
Forked from oliworx/new-mysql-db-and-user.sql
Created October 2, 2025 19:47
Show Gist options
  • Save bonelifer/7cbfa90881d2145f4d17762606e02308 to your computer and use it in GitHub Desktop.
Save bonelifer/7cbfa90881d2145f4d17762606e02308 to your computer and use it in GitHub Desktop.
Create a New DB and User in MySQL
CREATE DATABAESE MYNEWDB;
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON MYNEWDB.* TO 'newuser'@'localhost';
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment