Skip to content

Instantly share code, notes, and snippets.

@gzxultra
Last active September 30, 2017 08:16
Show Gist options
  • Save gzxultra/eaa2db8323b1769c5a840d18de90aeb1 to your computer and use it in GitHub Desktop.
Save gzxultra/eaa2db8323b1769c5a840d18de90aeb1 to your computer and use it in GitHub Desktop.
create user grant privileges
```sql
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON DB_NAME.* TO user_name@'%';
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment