Thursday 22 August 2013

Create a mysql database & user


mysql -u root -p

##create the database

create database DATABASENAME;

##create the user and password

grant all privileges on DATABASENAME.* to 'USERNAME'@'localhost' IDENTIFIED BY 'PASSWORD' with grant option;

#grant access for that user to their database

grant all privileges on DATABASENAME.* to 'USERNAME'@'%';

No comments:

Post a Comment