2010-02-05

create mysql db with user

When i start a new project and need a new mysql db, i always google to find how to create it. Now here it comes for reference:


drop database potato;
create database potato;
grant all on potato.* to potato@localhost IDENTIFIED BY 'potato' ;


after that jdbc url will be jdbc:mysql://localhost:3306/potato