MySQL triggers are not used in the usual way, this time to use, feel particularly convenient. Simply summarize the usage.Let's take a look at the two triggers I wrote:/ * UPDATE trigger * / DROP TRIGGER IF EXISTS t_update_on_t_tradefee;create
http://dngood.blog.51cto.com/446195/1150031
Log_slow_queries =/usr/local/mysql/var/slow_queries.log #慢查询日志路径
Long_query_time = Ten #记录SQL查询超过10s的语句
log-queries-not-using-indexes = 1 #记录没有使用索引的sql
The reason is that
The adaptive Hash index is implemented in the same way as the hash table discussed earlier, but it is only created and used by the database itself, and the DBA itself cannot intervene. The adaptive hash index near-hash function is mapped to a hash
1, if there is an or in the query condition, even if the condition of the query with an index will be invalidated, if you want to use or, and do not want to invalidate the index, you can only add all the columns in the OR condition index2, like
According to the old boy's teacher's video, the risk of master-slave replication is that users with write access are connected to data changes from the library.Several methods are given in the video1) Reclaim the user's write permissions from the
function: from_unixtime function: mysql with int ( One) The time stored is "YYYY-Mm-DD "format to display. Syntax: From_unixtime (Unix_timestamp,format) returns a String representing the Unix time tag, formatted according to the format string.
There are many ways to convert a table's storage engine to another engine, each with its pros and cons:A:alter tableThe simplest way to change a table directly from one engine to another engineALTER TABLE Tb_name ENGINE=INNODB;Note: This method
The simplest way to page pagination is this.Select * from ORDER by desc 10000,tenThe table has around 5w of dataThe average execution time is around 10s, so the query is very inefficient in the case of large data volumes.There are several ways to
MySQL Green Edition installation process1. Download mysql:http://www.mysql.com/downloads/2. Configure the environment variables.1) New variable:Variable name: Mysql_hmoeVariable Value: absolute path for MySQL 2) Add the new variable to path:In
Login to the following websitehttp://dev.mysql.com/doc/650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7A/2B/wKiom1akvUWSPLF6AAEbjptnbBg530.png "title=" A1. PNG "alt=" Wkiom1akvuwsplf6aaebjptnbbg530.png "/>Select the appropriate version
1. Under the server, create the following 3 folders: Mkdir/bak,mkdir/bak/bakmysql,mkdir/bak/bakmysqlold. Build a shell script under the/bak/bakmysql folder: touch/bak/bakmysql/backup.sh. Authorization to File: chmod 755/bak/bakmysql/backup.sh.2.
1.mysql failed to initialize:Mysqld-initialize is a failure because it was previously installed, removed later, and is now reinstalled.Workaround:1) command line execution: mysqld--initialize--user=mysql--console2) Execute the above command first to
The relational database relies on the primary key, which is the cornerstone of the database physical pattern. There are only two uses of the primary key at the physical level:Uniquely identifies a row.As an object that can be effectively referenced
MySQL architecture selection for OLTP applicationsBefore we make up our mind to migrate core enterprise applications from enterprise-level databases to open-source database products and use local disks instead of shared storage. I think we must face
Verify the MyCAT Character Set
The default Character Set of MyCAT is UTF8.
The following describes how to check the log to verify the effect of different MySQL client character sets and server character sets on MyCAT.
There are three main parts of
MySQL deadlock caused by load data statement, mysqlload
The deadlock reported by an online project briefly describes the causes, solutions, and related points.
1. Background
This is a project similar to DATA analysis. DATA is completely imported
Details about deadlocks in MySQL and how to handle deadlocks.
When multiple transactions hold and request locks on the same resource at the same time and generate a circular dependency, a deadlock occurs. A deadlock occurs when a transaction
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