Wednesday, December 9, 2009

Create a MySQL database for new user

To create a database and a user, to grant some privileges:

CREATE DATABASE test_db DEFAULT CHARACTER SET UTF8;
CREATE USER 'user'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON test_db.* TO 'user'@'%';

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.