The first step is to set the owner first:Set the user and IP of the primary IP that is allowed to accessCREATE USER ' repl ' @ ' 35.198.196.205 ' identified by ' slavepass '; #创建用户GRANT REPLICATION SLAVE on * * to ' repl ' @ ' 35.198.196.205 ';
Self-correlating query (self ID associated with its own ID (primary key), the query can be logically divided into two tables, and then a separate alias to distinguish)SELECT * FROM areas as CityInner join areas as provinces on
Original: http://bbs.landingbj.com/t-0-246222-1.html http://bbs.landingbj.com/t-0-245851-1.htmlOptimization of the MyISAM storage engine in MySQL performance tuning.The points to consider in optimizing the MyISAM storage engine are as follows:As far
1.1. Shell script automatically compiles and installs MySQL1, enter the script fixed directory, write the automatic installation MySQL scriptcd/server/scripts/Vim zidong_bianyi-install_mysql.sh#!/bin/bash. /etc/init.d/functionsMysql_tool_dir=
1. install mysql firstSpecific tutorials can refer to 52446608Note When installing the product, remember to choose MySQL Connector C,2. After installing mysql , start the configuration, click Project , Click Project Properties,3. Select the address
Partial indexChar/varchar2 too long, all indexed, inefficient, waste storage spaceSelect AVG (length (username)) fromIndex statistics:
Show index from table
SELECT * FROM I_s.statistics
Mysql.innodb_index_stats
MySQL5.7 Index
MySQL installation environment configuration and other introduction1, installation recommendation: MySQL 5.5 installation configuration method graphic Tutorial _mysql2. Configure the environment variable path3,cmd: Enter MySQL mode4, the general use
With the accumulation of data, slowly some of our bad habits will be exposed in the system, the efficiency of the program execution is low, the user experience is reduced, if we do not take some measures, then users will be lost.Improving the
In a general query, it is required to do as much as possible around the created index. For indexes, there are primary key indexes, single-column indexes, combined indexes, index merging and so on.When evaluating an index, it is critical to see the
Read Catalogue
An introduction
Two Insert data inserts
Three Update data updates
Four delete data deletes
Five query data Select
Six Rights Management
An introductionMySQL Data manipulation: DML======================
Mysql recursive queryDefinition: Parent-Child query: query all the following child node data according to the parent ID; child Parent query: query all the parent node data according to the child ID;1 Creating a TableDROP TABLE IF EXISTS' shop
Rights Management#authorization actions can only be done by the root user!! SetGlobalvalidate_password_policy=0;setGlobalValidate_password_length=1;#Security settings issue, check this: http://www.jb51.net/article/95399.htmCreate an account:#Local
First, the grammar
Select Grouping function, after grouping field from table "where filter Condition" Group by Group Field "Having group filter" "Order by Sort List"
Second, the characteristicsPre-grouping filter: Where-original
In the morning, Red came to ask me that a function of the site has gone, looked at the database, a table is missing. Okay, in the heart, MMP, start recovering data.Environment: A full library backup restores a table1.1 Viewing Backup Data[Email
I don't expect to be an expert DBA, but when I optimize MySQL, I'm advocating the 80/20 principle, which makes it clear that by simply tweaking some configurations, you can squeeze up to 80% performance gains. Especially at a moment when server
Create a new event in the event SQLyog a database and write the code:DELIMITER $ $ALTER definer= ' root ' @ '% ' EVENT ' 0 ' on SCHEDULE every HOUR starts ' 2018-04-18 00:00:00 ' ENDS ' 2028-12-31 00: 00:00 ' On completion no PRESERVE ENABLE do
MySQL the next dayKeywords: grouping aggregationSelf-correlatingphysically a table, logically two tablescreate table areas(id int primary key,atitle varchar(20),pid int,foreign key(pid) references areas(id)); Import SQL Filesource areas.sql;
First, MySQL master-slave introduction
MySQL master-slave is also called replication, AB replication. Simply speaking is a and b two machines from the back, write the data on a, the other B will follow the writing data, both data real-time
How to delete duplicate dataBusiness Scenario: Delete repeated comments for the same item in the comment table, leaving only the oldest one.
See if there is a duplicate comment for the same item on the same order.
SELECT
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