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 .