How to create database and table in Mysql




INSTRUCTIONS:

Step 1.) Download and install Xammp, by default xammp will install in the local C: drive
           
Step 2.) Configure The bin directory of Mysql to environment path to System properties, you can copy the code right here: C:\xampp\mysql\bin and paste it to the environment system.

Step 3.) Run the xammp server and tick MySQL and apache server checkbox, when prompt to install just click yes. Then if all is done correctly and no errors, you can now start using Mysql via cmd or to the PHPMyAdmin.

Step 4.) Create your database and tables: See the example below
              

Only works for CMD users 
Mysql -u root -p;   //only work  if no password is set
Create database db;   // codes for creating your database name as db
show databases;         //codes to show databases
use db;                         // To use database 
create table contents;  // codes to create a table
show tables;                   // see list of table already created
select * from contents;   // use to show information for the selected contents table



     
         
          
           




            


Post a Comment

0 Comments