MySQL Database

This time I'll share a little knowledge I had learned about using the MySQL command line.

First, make sure that your computer or laptop already installed a web server like Xampp or Wamp.

Well after a web server installed in your computer or laptop, the next step is to start service from a web server so that we can access MySQL from the command line. After all the service at the start, it is now time for us to use MySQL from the command line. Go into Command Prompt and then type the following command:

-> Cd \

-> Cd xampp \ mysql \ bin

-> Mysql-u root (used to enable MySQL and MySQL to writing code)

After MySQL is active, we are now going to learn to process the database. Here are some commands that can be used to process the database:

1. See the list of existing database.

-> SHOW databases;

2. Create a database.

-> CREATE DATABASE [database_name];

example:

-> CREATE DATABASE exercise;

3. Switch the database to be used.

-> USE [database_name];

example

-> USE exercise;

4. Deleting databases.

-> DROP DATABASE [database_name];

example

-> DROP DATABASE exercise;


0 comments to "MySQL Database"

Post a Comment

Advertisement

Chat

Labels

Followers

Pagerank

Web hosting for webmasters