A brief introduction: Today let's talk about some problems in the slow query logTwo phenomena: Slow log appear some slow SQL, slow log appear slow SQL is not strange, strange is slow log take out itself is the second level execution, not slowThree
MySQL Database Development Learning Tutorial one, database designDatabase design (i)--Database designhttp://blog.51cto.com/9291927/2087925Second, MySQL database development Basic TutorialThe basic MySQL database development Tutorial directory is as
--function--set the time zone.SetTime_zone= ' the';--Turn on Event SchedulerSetGLOBAL Event_scheduler= 1; DropEventif existsCommission_ms_ever_month; # set the delimiter to'$$'DELIMITER $$CreateEvent Commission_ms_ever_month onSchedule every1
Set a password for the root user of MySQL1. The newly installed MySQL does not have a password set2. Set the password*************************************************************************************************************** *********************
The data structure and algorithm principle behind MySQL indexFirst, the definitionIndex definition: Index is the data structure that helps MySQL to get data efficiently.Essence: An index is a data structure.Second, B-treeM-order B-tree meet the
Sometimes in order to avoid master.info and relay log crashes, the cost of tolerating extra Fsync () is recommended to setSync_master_info = 1Sync_relay_log = 1Sync_relay_log_info = 1Of course, if the standby and the main library latency is
Installing MysqlslaSource Path: https://github.com/daniel-nichter/hackmysql.comSource Storage Path:/USR/LOCAL/SRC1. Get the source codeIf you don't have a git command, install git firstYum Install Gitcd/usr/local/srcgit clone
MySQL Incremental backup and recovery
Incremental backup: Only those files that were modified after the last full or incremental backup are backed up.
Advantages: No duplication of data, backup volume is small, time is short.
1. mysql View userMysql> select User,host,password from Mysql.user;2. mysql Password changemysql> Update mysql.user set Password=password ("Anonymous") where user= "root" and host= " localhost "; (set new password)mysql> flush privileges; (refresh)3.
Today using the IDE connection line under MySQL error can not connect to MySQL server. Too many connections, the error is clear, the connection with MySQL is full. Also, each service creates a MySQL connection pool, which takes up a lot of long
MySQL Master-slave replication
The circumstances of the case:
Host
Operating System
IP Address
main software
Primary server
CentOS 7.3 x86_64
192.168.217.130
Ntp
MySQL database provides a very useful tool mysqldump to back up the database, the following will use the mysqldump command to back up all the databases and specify the databaseOne, mysqldump backup all database data at
MySQL User available permissionsA new MySQL user does not have any access rights, which means that you cannot do anything in the MySQL database. You have to give the user the necessary privileges. The following are some of the available
1. General IndexThis is the most basic index, it has no restrictions, such as the previous index created for the title field is a normal index, myiasm in the default index of the Btree type, but also in most cases we use the index.– Create indexes
This article focuses on using Yum to install MySQL under Linux, and to start, log on, and remotely access the MySQL database.1. InstallationSee if you have installed:Yum List installed Mysql*rpm-qa | grep mysql*To see if there are any installation
MySQL master-slave copy function principle1, in the business complex system, there is a scenario, there is a SQL statement need to lock the table, resulting in the temporary inability to use the Read service, then it will affect the operation of the
The implementation principle of database replication replication1. The primary server, where the statement is run, produces a binary log binlog2. Continuously read the binlog of the master server from the server3. Binlog translated from the master
The + + PRIMARY key (primary key) uniquely identifies a row in the table for a property or attribute group + +. = = A table can have only one primary key = =, but may have multiple candidate indexes. = = Primary key can guarantee record unique = =
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