Minggu, 30 Oktober 2016

Create a simple database using XAMPP and Command Prompt


Well, this time I will explain how to create a database using the Command Promt and XAMPP
Before I begin how to create a database in CMD and XAMPP I will explain a little about MySQL. For this, you are going to use SQL (Structured Query Language). SQL is a special language that allows programmers to issue instructions or 'query' to the database.

Creating a MySQL database via CMD is a bit harder than creating a database directly using the browser because there is already using the GUI mode (Graphical User Interface) without having to type SQL commands.

to start, you have to install xampp on your laptop, but if you don't have the software please download the official website of xampp.

let's start ....

Make a mysql database via CMD

1.     Make sure XAMPP has been able to run well
2.     Run xampp on the your laptop then click start on apache mysql and make sure the button start turned into stop indicating that mysql already running.. for more details see the image below
1xampp
3.    Press the Windows + R on your keyboard and enter the word CMD then ok, or you can also click the Windows logo located in the bottom left - all programs - Accessoris - Command Prompt
2cmd
 4.     Well, after entering in the courtyard command prompt (cmd) is time we go in mysql, type the following                command....

a) cd c:\xampp\mysql/bin    
b) mysql -u root 
3cmd


5.  Once in mysql, it's time to create a database by typing following the command.
a) create database school;    
b) show databases;


4cmd



6.   To input data into the table the way by typing " insert into ( whatever ) values         ('name','address',gender'); "          depending on how much you make that row or column 

5cmd
6cmd
7cmd
8cmd



 7.      if you want to update the data, you can use the following syntax

example :
UPDATE students SET name='Mark Feehily' WHERE srn='1231';

9cmd


 8.     if you just want to see the name and gender, you can use the syntax
    example:     
   SELECT name,gender FROM students;
10cmd
Thanks to :
  • http://wildanramadhan27.blogspot.co.id/
  • http://www.duniailkom.com/tutorial-belajar-mysql-update-data-tabel-dengan-query-update/





Tidak ada komentar:

Posting Komentar