Definition of a stored procedureA stored procedure is a lump of declarative SQL statements stored in a database directory.Applications such as java,python,php can call stored procedures.Since the MySQL 5.0 release, stored procedures, stored
Start the databaseThe usual statements to start MySQL or stop MySQL are as follows:1. Start the service:CENTOS6:Service mysqld StartCENTOS7:Systemctl Start mysqld2. Restart the service:CENTO6:Service mysqld RestartCENTOS7:Systemctl Restart Mysqld3.
Single-Table QueryMySQL query data from the data table is the most basic statement is a SELECT statement, in the previous "additions and deletions" has been used: SELECT * from the table name, that is, to query all the data in the specified data
MySQL Execution plan
Optimizing queries with explain
Explain output format
Extended Explain output format
Get execution plan information for a named connection
Estimating Query Performance
EXPLAIN Syntax
First, basic usedistinctis generally used to remove duplicate records in the query results, and this statement in select , insert , delete and update can only be used in, select the specific syntax is as follows:select distinct
First, the experimental principle: 1, the topological structure diagram is as follows:2, Working principle:
Save binary log events from the Master of Downtime crashes (Binlog events)
Identify slave that contain the latest updates
MySQL GTID Series one by one. Gtid Related Concepts Gtid: The global transaction identifier, the MySQL5.6 version begins with the heavyweight feature introduced in master-slave replication. For each commit transaction, the current thread of
Hash index structure of the particularity, its retrieval efficiency is very high, index retrieval can be located at once, unlike B-tree index need from the root node to the side point, and finally access to the page node so many IO access, so the
MySQL parameter optimizationMySQL parameter optimization for different sites, and their online volume, traffic, number of posts, network conditions, as well as the machine hardware configuration has a relationship, optimization can not be done at
MySQL between Usage1. Numerical typeThe between operator is used in the WHERE expression to select a range of data between two values. Between is used in conjunction with and with the following syntax:WHERE column between and value2 WHERE column
===============================================2018/7/1_ the 1th time to modify Ccb_warlock===============================================MySQL has a very tight relationship as a common relational database and project. Because of the frequent need
Gtid conceptGTID, global transaction ID globaltransaction identifiersGtid is a transaction that corresponds to a globally unique ID that is used to identify the transaction as it is logged to Binlog.GTID counterpart transactions are performed only
After installation, mysql-h localhost-u root-p time error,ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)First step: Delete the Ib_logfile0 and ib_logfile1 files under/usr/local/mysql/data/.Step two: Stop the
The Range Partition Table build Table statement is as follows, where the partition key must and ID form the primary key and the unique keyCREATE TABLE ' test1 ' ( ' id ' char (+) COLLATE utf8mb4_unicode_ci not NULL COMMENT ' self-increment primary
MySQL user management 1. Create a regular user and authorize[[Email protected] ~]# mysql-uroot-p ' szyino-123 ' warning:using a passwordThe command line interface can insecure. Welcome to the MySQL Monitor. Commands End With;or \g.your MySQL
Backup Policy 1, type of backupType 1:
Hot backup: Read/write not affected (MyISAM does not support warm-up, INNODB support)
Warm backup: Can only perform read operations
Cold backup: Offline backup, read and write operations are
MySQL has the following types of logs:Error log:-log-errQuery log:-logSlow query log:-log-slow-queriesUpdate log:-log-updateBinary log:-log-binBy default, all logs are created in the MYSQLD data directory. By refreshing the log, you can force mysqld
Now most of the environment that MySQL runs is on Linux, how to optimize on the Linux operating system according to MySQL, we give some general simple strategy here. These methods help improve the performance of MySQL.Now most of the environment
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