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

article image
»

VTC: AJAX

VTC: AJAX 168 Mb Title: Ajax Author: Steve Holzner SKU: 33713 ISBN: ...

article image
»

Linkin Park – Minutes to Midnight

Linkin Park – Minutes to Midnight ——-[Track ...

article image
»

VLC (VideoLAN) ‘The luggage’ for Windows 1.1.0 RC3

VLC (VideoLAN) is a multi-platform multimedia player. It can read ...

iPhoness
»

AT&T And Sprint Report iPhone 4S Sales Success

Everyone know that yesterday iPhone 4S began selling in seven ...

article image
»

Linkin Park – Minutes to Midnight

Linkin Park – Minutes to Midnight ——-[Track ...

photo_1313974112182-1-0
»

Skype buys messaging startup GroupMe

Skype, the Internet communications group set to be acquired by ...

article image
»

Neal Goldstein, “iPhone Application Development For Dummies, Second Edition”

Neal Goldstein, “iPhone Application Development For Dummies, ...

whatsapp
»

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

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

article image
»

Skype Blocks, Threatens To Sue Fring (Update: Skype Says Fring Is Lying)

Late last week, mobile communication services provider fring ...

Get Adobe Flash player