Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save boywijnmaalen/6f08189cc357c31a3621 to your computer and use it in GitHub Desktop.
Save boywijnmaalen/6f08189cc357c31a3621 to your computer and use it in GitHub Desktop.
Create new DB user and grant local access to a newly created DB
CREATE DATABASE `<database name>`;
CREATE USER '<database user>'@'localhost' IDENTIFIED BY '<password>';
GRANT ALL ON <database name>.* TO '<database user>'@'localhost';
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment