MySQL command

kinds

command

creating database

CREATE DATABASE database name;

view database list

SHOW DATABASES;

Select database to work with

USE database name;

creating table

CREATE TABLE table name;

View all fields in the table

desc or describe table name

Add data to the table

INSERT INTO table name VALUES(data, data, data)

View all data in the table

SELECT * FROM table name;





Frequently Used Commands

kinds

command

meaning

Database commands

create

Creation of database

drop

Deletion of the database

use

Database selection

Table command

create

Create Table

desc or describe

Table structure

alter

Change field in table

rename

Rename Table

drop

Drop table

Data manipulation instruction

insert

Record input

select

record search

update

Record changes

delete

Delete record

Database backup and restore

mysqldump

Database backup

mysql

Database restore