1 View Linux Distributions
[Root@typecodes ~]# Cat/etc/redhat-releaseCentOS Linux release 7.2.1511 (Core)
2 Download the MySQL official yum Repository
According to the Linux distribution (CentOS, Fedora is the Red Hat system), from the MySQL
What is a table partition
A table partition is a large table, divided into several small tables according to the conditions. Mysql5.1 began to support datasheet partitioning.For example, if a user table has more than 6 million records, the table
The specific resolution steps are as follows, hoping to help students who have the same problems:
Locate and modify the My.cnf file. Under different Linux systems, my.cnf are placed in different locations. Here is an example of Ubuntu server, and
The important thing is the above mentioned:
INSERT ... SELECT
INSERT ... On DUPLICATE KEY UPDATE
INSERT ... On DUPLICATE REPLACE
For example, to insert a piece of data into a table, if the table does not have that data inserted, if the data
Access to the MySQL DOS command page, the method from the DOS interface into the MySQL database command line management interface, to find the installation location of MySQL and CD access, generally "... mysql\bin\"; enter "Mysql-u root-p" and then
The basic syntax for the CREATE TABLE statement in MySQL is:
The code is as follows
Copy Code
CREATE [temporary] TABLE [IF not EXISTS] tbl_name [(create_definition,...)][Table_options] [Select_statement]
The table looks like this
The code is as follows
Copy Code
SELECT * from ' test_table_draw ' WHERE ' borough_id ' >=10266 and ' borough_id 'huxing tableSELECT * from ' test_table_pic ' WHERE ' borough_id ' >=10266 and '
SQL inline Syntax basic syntax (INNER join)
SELECT * FROM table 1 inner JOIN table 2 on table 1.userid= table 2.userid
SQL Inline Syntax Description: The above statement is the query Table 1 and table 22 tables, as long as the UserID field in two
Today, I'm going to help my colleagues with a SQL (Simplified) execution error:
The code is as follows
Copy Code
Mysql> Select Date_format (' 2013-11-19 ', ' y-m-d ') > Timediff (' 2013-11-19 ', ' 2013-11-20 ');
First, let's talk about why you want to divide the table.
When a single piece of data reaches millions of, you'll have more time to query, and if there's a joint query, I think I might have died there. The purpose of the table is to reduce the
Here's a few simple Query examples to show DISTINCT implementations.
1. First look at the DISTINCT through a loose index scan:
The code is as follows
Copy Code
sky@localhost: Example 11:03:41> EXPLAIN SELECT DISTINCT
The code is as follows
Copy Code
SELECT * from TB where c> date_format (' 2007-07-06 ', '%y%m%d ') and C SELECT * from TB where c> date (' 2007-07-07 ') and c
Statday is a Date data field of type 2006031001
The
MySQL's default encoding is Latin1, does not support Chinese, then how to modify the MySQL default encoding, the following take UTF-8 as an example to illustrate
After you start MySQL, log in to MySQL with RootMySQL > Show variables like '
The first step should be to do is to troubleshoot problems, to find bottlenecks, so, start with the logTurn on slow query log
Mysql>show variables like "%slow%";
To view the slow query configuration, not add to the MY.CNF, as
Modify the phpmyadminconfig.inc.php files in the phpMyAdmin site for this machine
Find this line and change the ' localhost ' after [' host '] to remote database IP
The code is as follows
Copy Code
$cfg [' Servers ']
Today in the use of hibernate to MySQL insert data in the garbled problem, the specific performance when I utf-8 in the insertion of the Chinese when the OK, and then use the MySQL Workbench set to Uft-8 to show the data from the MySQL query is also
1. IntroductionIn the Web application architecture, the data persistence layer (usually a relational database) is a key core part that has a very important impact on the performance of the system. MySQL is currently the most used open source
Detailed MySQL Database tutorial recovery operation
Binlog is to back up data by recording a binary file, and then recovering data from a binary file to a certain time period or to an action point.
1: Open Binlog log record
Modify MySQL Tutorial
MySQL Tutorial SQL Length,right,char_length character processing function
LENGTH (str) Octet_length (str) Char_length (str) Character_length (str)Returns the length of the string str.
Mysql> Select LENGTH (' text ');-> 4Mysql> Select
4. Maximum sorting of query data (only one statement can be used for writing)Create table hard (qu char (11), co char (11), je numeric (3, 0 ))Insert into hard values ('A', '1', 3)Insert into hard values ('A', '2', 4)Insert into hard values ('A', '4'
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