Understanding mysql -- (mysql Learning 1) _ MySQL

Source: Internet
Author: User
Understanding mysql -- (mysql Learning 1) bitsCN.com

Understanding mysql -- (mysql Learning 1)

Mysql product: cpl protocol and commercial version

Cpl protocol: standalone and cluster version

Business: Classic, Standard, Enterprise, cluster

II. storage engine:

1. mysql server: mysqld program (similar to oracle instance)

Storage Engine: The storage engine is selected for table creation. If this parameter is not selected, the myIsam engine is used by default.

2. servers and hosts: Clients and servers

Parse --> optimize --> execute [mysql database management level | (mysqld)]

MyIsam/innodb/mysql cluster/falcon/other... [storage engine implementation]

File system

Hardware

Three types of programs: server programs, client programs, and non-client programs

Client programs are accessed through the server (mysqld), and mysqld accesses data through the storage engine. Non-client programs can directly access the storage engine without using mysqld.

Start the server: mysqld -- console

Shut down the server: mysqladmin-uroot-poracle shutdown;

3. the database is a set of tables logically and physically a collection of files.

To create a database, you create a folder and generate a. opt file to store database attributes such as character set and verification. to create a table, different files are generated based on different storage engines:

Select @ datadir; configure the database data storage directory

Select @ basedir; configure the database root directory

A. frm file will be created to store the table structure.

MyIsam engine:. myd (data file) and. myi (index file) are generated)

Innodb engine: will generate. idb or. ibdata file. check whether the configuration is to use a shared tablespace to store data and indexes or an exclusive tablespace to store data and indexes. if the exclusive tablespace is stored, each table will generate one. ibd file.

Select @ innodb_data_file_path; configure the name of each file. you can also configure this parameter without configuring... _ home_dir.

Select @ innodb_data_home_dir; configure the ibdataba data storage directory

4. mysql is a single-process multi-thread

5. the storage engine can be set at the server and table level.

Show engines; -- check what storage engine your mysql currently provides:

Show variables like '% storage_engine %'; -- check the default storage engine of your mysql instance:

Show create table name; -- it depends on the engine used by a table (the storage engine used for the table is displayed after the parameter engine in the display result ):

BitsCN.com

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.