First, the Knowledge reserve
MySQL database basic Operation knowledge Reserve
Database server: One computer (high memory requirements)
Database management system: Like MySQL, is a software
Database: Oldboy_stu, equivalent to Folder
Table: Student,school,teacher equivalent to a specific file
Entries: 1, Cao, 123456789,22 equivalent to a line in the file. Field
Ii. initial knowledge of SQL language
SQL (Structured Query language, structured queries language)
The SQL language is primarily used to access data, query data, update data, and manage relational database systems, which are developed by IBM.
The SQL language is divided into 3 types:
DDL statement Database Definition Language: Database, table, view, index, stored procedure. For example: Create drop alter.
DML statement Database manipulation language: Inserting data insert, deleting data Delete, updating data update, querying data Select.
DCL Statement Database Control Language: for example, to control user access rights Grant, revoke.
Third, the system database
INFORMATION_SCHEMA: Virtual library, does not occupy disk space, storage is the database after the startup of some parameters, such as user table information, column information,
Permission information, character information, and so on.
Performance_schema:mysql 5.5 started a new database: Primary user Mobile Database server performance parameters, record processing query requests
Events, locks and other phenomena that occur during the
MySQL: Permissions information for the authorization library, the primary storage system user.
A test database that is automatically created by the Test:mysql database system.
Iv. Creating a Database (folder)
1. Syntax
New Database (folder): Create database name CharSet UTF8;
2. Database naming rules:
Can be composed of letters, numbers, underscores, @, #, ¥
Case-sensitive, unique,
Cannot use keywords such as: Create Select
You cannot use numbers alone, maximum 128 bits.
V. Database-related Operations
1. View the database (folder) show Databases;show CREATE DATABASE Db1;select database (); 2. Select databases (folders) use database name; 3. Delete database (folder) drop database name; 4. Modify Database (file): type alter databases DB1 charset UTF8;
Mysql = = folder (library)