The New Stuff

shell-command-for-bloggers

Create a MySQL Database, Username, Password, and Privileges from the command line


Step 1: Login to MySQL ( you will need an account )

user@server:~$ mysql -u mysql_user -p
Enter password:

Step 2: Create the Database

mysql > create database db_name;

Step 3: Verify that it’s there

mysql > show databases;

Step 4: Create the User

mysql > create user db_user;

Step 5: Grant privileges while assigning the password

mysql > grant all on db_name.* to 'db_user'@'localhost' identified by 'db_password';

*Note: The localhost field usually doesn’t have to be edited, but you can set it to the specific address.

The above example grants all privileges, obviously. But you will likely want to limit privileges under many circumstances. These parameters include select, insert, and delete.
Choose all that apply and separate by comma, thusly:

mysql > grant select, insert, delete on db_name.* to 'db_user'@'localhost' identified by 'db_password';

Comments

comments

Recently Published

ice_cream_sandwch_bikes
»

Ice Cream Sandwich’s Face Unlock may be fooled by photos

Face Unlock is one of the most exciting new features for Ice Cream ...

article image
»

Facebook now enabled IPv6

Facebook’s Donn Lee has been getting the social network ready ...

article image
»

Disable The Send Error Report, to Microsoft

Disable The Send Error Report, to Microsoft To disable the stupid ...

win7useoct11
»

Windows 7 surpasses XP as most popular OS

  Windows 7 has surpassed XP as the most widely used operating ...

»

Head First Object-Oriented Analysis and Design

Head First Object-Oriented Analysis and Design | 41.98 MB Head ...

whatsapp
»

Whatsapp 2.10.1 features and is lifetime free of charge to iPhone users

Today popular messaging service released new version of whatsapp ...

ios-5-notification-center
»

Top 15 Jailbreak Widgets For iOS 5 Notification Center

iOS 5 brings a perfect feature called notification center which ...

article image
»

DVD Regions Information

DVD Regions Information Digital Camera Guide…!The DVD region code ...

article image
»

Steve Jobs ranked as the 110th richest person with $8.3 billion, Zuckerberg gets the 52nd

Apple‘s CEO Steve Jobs is ranked as the world’s 110th ...

Get Adobe Flash player