1. MySQL Infrastructure
1.MySQL is a relational database product and a database based on the relational model. Architecture can be divided into application layer, logic layer and physical layer. Application layer: Responsible for interacting with clients and users. Logical layer: Responsible for the specific query processing, things management, storage management, recovery management. Physical layer: The database file on the actual physical disk (e.g. data files, log files, etc.).
2. Overview of the query execution process
1.
3. mysql Permissions
1. Connection rights: Mysql-h address-u user-p password-p port number
2. Grant permissions and Reclaim permissions: Grant ...
Revoke ...
4, long connection, short connection, connection pool
1. Short connection: A connection is established when the program and database communicate, and the connection is closed after the operation is performed.
2. Long connection: After a connection is established between programs, it is opened and reused by subsequent programs.
3. Connection pooling: A database connection pool (Connection pooling) is a program that establishes enough database connections when it starts and makes these connections a pool of connections that are dynamically applied, used, and released by the program to the connection in the pool.
5. Introduction to Storage Engine
1. View the storage engine for the table: Show table status like ' table name '.
2.innoDB Engine: MySQL5.5 later version, InnoDB is the default engine.
Pros: 1. Disaster recovery Good 2. Support for all 4 levels of transactions. 3. Use row-level locks. 4. Implementing buffer Management 5. Support for foreign keys 6. Support Hot backup.
Myisab Engine: MyISAM is the default engine for mysql5.0/5.1.
Cons: No transaction support, poor disaster recovery, not recommended for use in a build environment.
6. mysql Replication architecture
1.MySQL Copy mode: master/Slave mode, main main mode, chained copy mode, ring copy mode.
7. Some basic concepts
1.MySQL Server, mysql instance, MySQL database in the real context, not specifically described, can be regarded as equal, describing the operation of the database.
2. Scalability (scalability): The ability of the system to continuously increase its carrying capacity.
3. Availability: Percentage of system uptime.
4. Single point of failure: a part of the system, once failed, will cause the entire system to fail to work.
5. Read and write separation
"MySQL DBA Practice" Reading notes (Chapter one understanding MySQL)