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 collate = utf8_general_ci;
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’;”