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';

Incoming search terms:

Comments

comments

Recently Published

article image
»

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

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

article image
»

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

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

article image
»

Get domain out of any URL string

It’s a common problem with no single right answer: extract the top ...

iPhoness
»

iPhone 4S Sells Out Across All U.S. Carrers — Apple Orders More iPhones

Apple’s new iPhone 4S sold out across all careers in the U.S. so ...

Mercedes
»

Mercedes Show’s Off “iPhone Interface Plus” Concept Video

  [media url=”YouTube video URL”]a “future of ...

timezone-460
»

iPhone 4S Battery Life Drain Caused By Bug In Location Services

As of yesterday we were told that there were no major suspects in ...

HTML Tables
»

List of problems occuring while using html tables

1. Rendering the table is time consuming The entire table must be ...

Multitasking
»

You Can Enable Multitasking Gestures & Display Mirroring On iPad 1 (No Jailbreak)

With the release of iOS 5, Apple has disabled multitasking gestures ...

1
»

A Drop Test Between iPhone 4S And Galaxy S II [Video]

Today we are going to show you a drop test between iPhone 4S and ...

Get Adobe Flash player