I can never remember how to create a new MySQL user

Anyway, here’s the mother-lovin’ SQL all in one place:

create database db_name;
grant all on db_name.* to 'user_name'@'localhost' identified by 'password';
flush privileges;

For simple, personal projects, db_name = user_name = password, just to make life a little easier.

Carry on.

Feel free to if you found this useful.

Care to Comment?

Or if you'd prefer to get in touch privately, please send me an email.

Name

Email (optional)

Blog (optional)