Skip to content

Creating new MySQL database and user

I often need to make a MySQL database and a user that can do anything in it:

create database bla character set utf8;
use bla
grant all on bla.* to 'jack'@'localhost' identified by 'password';

To drop a user:

drop user ‘jack'@'localhost’;

1 Comment ( Add comment / trackback )

  1. (permalink)
    Comment by halfgaar
    On September 30, 2010 at 11:23

    Drop them again by using “drop user ‘devil’@'localhost’;”

Post a comment

(required)
(required)

Your email is never published nor shared.

(optional)
Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>