Table I:Mysql> SELECT * from employee;+----+--------+---------+| ID | name | Manager |+----+--------+---------+| 1 | Zhang San | Li Hong || 2 | Zhang San | Li Hong || 3 | Harry | Liu Qian || 4 | Caifan | Ma Fang || 5 | Sun Yang | Ming Tak || 6 | Guo
General traffic is larger than the Web site, and the request log table is created independently of one table per day. The business needs to add a new column for each table, and for half a day, write a stored procedure like this:Log table structure
Preface://MySQL concurrency, asynchronous IO, process hijacking recently looking at high performance MySQL, record writing study notes: High performance MySQL learning notes (i) architecture and historical notes core content: MySQL server
Method 1: Use the Set password commandMysql-u Rootmysql> SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Newpass ');Method 2: Use Mysqladminmysqladmin-u root Password "Newpass"If Root has already set a password, use the following
Date_add () IncreaseMYSQL gets the current time plus one monthsUpdate User set Leverstart=Now (), leverover=1MONTHwhere id= 1;Date_sub () reductionDate_sub ('1998-01-01 00:00:00'1 1:1:1' day_second)Month monthsminute minSecond SECHour HoursWeek
ORM OperationSELECT * from TB where ID > 1#对应关系Models.tb.objects.filter (Id__gt=1)Models.tb.objects.filter (id=1)Models.tb.objects.filter (Id__lt=1)Create Class1.db-first: Automatically create database tables based on class#models. pysettings.py to
RDS for MySQL Archives historical data by partition
Original table
Partition
Stored procedures for partition maintenance
Events that call a stored procedure every month
with the accumulation of data and the increase of data volume,
an installation article1. Installing NginxYum check-update #更新yum源yum Remove httpd* php* #删除系统自带的软件包yum install Nginx #安装nginx Follow the prompts to enter Y for installation chkconfig nginx on #设置ngin X Boot service Nginx start #启动nginx2. Install
http://blog.csdn.net/xiaozhuanddapang/article/details/53185775Situation one: Download the DMG file directly on the MySQL website to install, forget the password1. Turn off the MySQL serversudo /usr/local/mysql/support-files/mysql.server stop2. Enter
The use of the explain command and the relevant parameter description.Https://dev.mysql.com/doc/refman/5.7/en/explain-output.htmlEXPLAIN Output Columns
Column Name
Description
Id
Executes the number
MyISAM Engine Features1. Transactions are not supported (transactions refer to a logical set of operations that make up each unit of this set of operations, either fully successful or fail all)2, table-level locking (Lock the entire table when data
SQL statementsSQL is an abbreviation for Structured query Language (Structured Query language). SQL is a set of operational commands built for the database and is a fully functional database language.When using it, only the "What to Do" command is
This afternoon idle nothing to do, the team leader let me familiar with the C + + connection database, and operation, the whole process is smooth, in order to remember and next use, now the whole process is recorded:1. Install MySQLSlightly2. Create
MySQL storage engine--myisam and InnoDB difference-good water, water good for all things without contention. -CSDN Blog http://blog.csdn.net/xifeijian/article/details/20316775MyISAM and InnoDB explanationInnoDB and MyISAM are the two most common
1, create the replication user, with replication slave permissions, can ensure that slave master data synchronization past master: #grant replication Slave on * * to ' rep ' @ ' 192.168.10.100 ' identified by ' 123456 '; 2, open Gtid need to enable
MySQL (a)SQL statementsSQL is an abbreviation for Structured query Language (Structured Query language). SQL is a set of operational commands built for the database and is a fully functional database language.When using it, only the "What to Do"
Mysql installation and configuration optimization, Mysql installation and configuration optimization
I. InstallationApt-get install mysql-server requires setting the account password
apt-get isntall mysql-client
Apt-get libmysqlclient-dev2. Run sudo
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