Tutorial for CREATing Mysql Databases

How to ...

Moderators: TARA24, DanL, SCOOP

Tutorial for CREATing Mysql Databases

Postby TARA24 on 25 Apr 2010, 21:03

Today we learn how to create a MySQL DataBase

MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. MySQL is officially pronounced /maɪˌɛskjuːˈɛl/ ("My S-Q-L"), but is often pronounced /maɪˈsiːkwəl/ ("My Sequel"). It is named for original developer Michael Widenius's daughter My.

First of all we need installed MySQL
Now we have to open the Terminal:
Logging to MySQL...

To create a MySQL DataBase first we have to log in into MySQL.
Type the following:
Code: Select all
mysql -u root -p

Creating MySQL Database...

Now that we are logged in we can start Creating our Desired DataBase.
Type the following:
Code: Select all
create database kleinekevin;

grant usage on *.* to root@localhost identified by 'your_mysql_password_here';

grant all privileges on kleinekevin.* to root@localhost ;

exit

Now your New Database is Created.
NOTE: Replace kleinekevin with your desired DataBase Name .
To check if your Database is there type the following command:
Code: Select all
mysql -u root -h localhost -p -Bse 'show databases'

Output will be something like this:
kleinekevin
kleinekevinampache
kleinekevinforum
kleinekevintracker
kleinekevinwebsite
mysql
verlihub

Have Fun .
~~~ Remember , by making a new Folder called SOURCES in your HOME folder and placing there all your downloaded Sources make's your job easyer ~~~
User avatar
TARA24
Site Admin
 
Posts: 282
Joined: 21 Jul 2009, 19:16

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron