- 1. How to create database?
- # CREATE DATABASE database_name;
- Ex: CREATE DATABASE employee;
- 2. How to give permissions to a user to access the database?
- # GRANT ALL PRIVILEGES ON database_name.* TO username@server IDENTIFIED BY 'password'
- Example: # GRANT ALL PRIVILEGES ON database TO 'akila'@'localhost' IDENTIFIED BY 'akila';
- 3. How to delete a database?
- #DROP DATABASE database_name;
- Ex: #DROP DATABASE test;
Wednesday, November 9, 2011
My SQL - Database related commands
Labels:
MySql