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
»

Create a Music Playlist

Create a Music Playlist I assume that you already know how to add ...

article image
»

Visual Basic 2008 Step by Step (with companion CD)

Visual Basic 2008 Step by Step (with companion CD)   Teach ...

article image
»

Keyboard Short cuts…

Keyboard Short cuts… Getting used to using your keyboard ...

article image
»

Portable Soft191 Password Manager 1.02

Portable Soft191 Password Manager 1.02 Safely store and easily ...

article image
»

Beyonce – Irreemplazable (2007)

Beyonce – Irreemplazable (2007) SONGS 1. Amor Gitano ...

article image
»

Portable Yahoo Messenger v8.1

Portable Yahoo Messenger v8.1 Enjoy everything Messenger has to ...

article image
»

Display Song Lyrics in Windows Media Player with Lyrics Plugin

Looking for a way to display song lyrics in Windows Media Player? ...

photo2-466x700
»

SemiTether 0.9.1 Released To Bring Some Great Improvements & Bug Fixes

Last week we’ve broke the news about the perfect solution for iOS ...

article image
»

10 Fast and Free Security Enhancements

10 Fast and Free Security Enhancements Before you spend a dime on ...

Get Adobe Flash player