Sunday 22 May 2011

MySQL Create DB

Crete a DB | schema:
CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name [create_specification] ...
create_specification:
[DEFAULT] CHARACTER SET [=] charset_name | [DEFAULT] COLLATE [=] collation_name
Create Uer:
CREATE USER 'username'@'%' IDENTIFIED BY 'mypass';
Permissions:
GRANT ALL ON db_name.* TO username @'%' IDENTIFIED BY 'mypass';
Note: Users 'User'@'%' and 'User'@'localhost' are not the same.

Possibly Related Posts

No comments:

Post a Comment