Skip to content

Instantly share code, notes, and snippets.

@liamcurry
Created November 10, 2012 16:26
Show Gist options
  • Save liamcurry/4051577 to your computer and use it in GitHub Desktop.
Save liamcurry/4051577 to your computer and use it in GitHub Desktop.
Maintenance snippets

Start/Restart/Stop MySQL

mysql.server [stop|start|restart]

Create a MySQL database

create database db_name;

Create a new MySQL user

create user 'username'@'localhost' identified by 'password';

Give a MySQL user access to a DB

grant all privileges on 'username'@'localhost' to 'username'@'localhost' with grant option;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment