Posts Tagged ‘Database’

How to Create Database and Add User To It

Friday, July 25th, 2008

Here are the SQL commands:

create database newdb;

grant CREATE,INSERT,DELETE,UPDATE,SELECT on newdb.* to newuser@localhost;

SET PASSWORD FOR 'newuser'@'localhost' = password(’newuserpass’);
– or –
SET PASSWORD FOR 'newuser'@'localhost' = old_password(’newuserpass’);

flush privileges;