Getting Started with mysql< database >

Source: Internet
Author: User

Getting Started with databases Basic Knowledge Database Overview

A database is the center of information that stores data and is an organized collection of data. Database is the simplest to understand the warehouse where the data is stored

A database (DATABASE,DB) is a warehouse that organizes, stores, and manages data according to its structure, which itself can be seen as an electronic file cabinet, where users can add, delete, modify, and find data in files.

The database system consists of database, database management system, database application and so on.

Database storage Structure

A database is a warehouse where data is stored and managed, but the database is not able to store data directly and the data is stored in a table.

In the process of storing data, the database server must be used, the so-called database server is to install a database management program on the computer.

SQL Language

SQL is a structured query language, is a database query language and programming language, mainly for the management of data in the database, such as access to data, query data, update data, etc.

The relational database language consists of 4 parts

(1) Data definition language (DDL)

    (2) Data Manipulation language (DML)

    (3) Data Query Language (DQL)

    (4) Data Control Language (DCL)

Common Database Products

Oracle Database, Oracle

SQL Server Database

DB2 Database

MongoDB Database

MySQL Database

MySQL directory structure

Bin directory

Used to place some executable files, such as Mysql.exe, Mysqld.exe, Mysqlshow.exe, etc.

Data Directory

Used to place some log files and databases

Include directory

For placing some header files, such as mysql.h, mysqld_ername.h, etc.

Lib Directory

For placing a series of library files

Share Directory

For storing information such as character sets, languages, etc.

the use of MySQL

Start the MySQL service

DOS command net start (stop) MySQL

Log in to MySQL database

DOS command mysql-u Root-proot

Related commands for MySQL

Help information for the "\h" command

Reconfigure MySQL

Set character_set_client = GBK temporarily changing the encoding

Modify My.ini file Default-character-set=utf8 long-term effective

Common Commands

? (\?) Display Help information

Clear (\c) explicit Current input statement

Connect (\ r) connect to the server, optional parameter database and host.

delimiter (\d) sets the statement delimiter.

Ego (\g) send commands to the MySQL server and display the results.

Exit (\q) quit MySQL

Go (\g) send commands to the MySQL server.

Help (\h) Display Help information

notee (\ t) The output file is not written.

Print (\p) Print Current command

prompt (\ r) change the MySQL prompt message.

quit (\q) quit MySQL

Rehash (\#) rebuild to complete the hash.

Source (\.) executes an SQL script file with a file name as a parameter.

Status (\s) Gets the status information for MySQL from the server.

Tee (\ t) Sets the output file (output file) and adds the information to all the given output files.

Use (\u) use another database, the database name as the parameter.

CharSet (\c) Switch to another character set

Warnings (\w) a warning is displayed after each statement.

nowarning (\w) no warning is displayed after each statement.

Getting Started with mysql< database >

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.