It is often found that developers look up the statements that are not indexed or limit N, these no statements will have a significant impact on the database, such as a large table of tens of millions of records to scan all, or do not stop doing
The following is an excerpt from the MySQL 5.1 Chinese manual about Utf8_unicode_ci and utf8_general_ci:
Currently, the UTF8_UNICODE_CI proofing rules only partially support the Unicode collation algorithm. Some characters are still not supported.
MySQL master configuration small Note:
There are four machines: A (10.1.10.28), B (10.1.10.29), C (10.1.10.30), D (10.1.10.31).
After the configuration result: A-c is mainly from, B is a slave,d for C slave.
0) Preparation workAfter installing
My.ini in the MySQL directory, and then copied a my.ini on a colleague's machine to modify it and put it in a separate place as a backup. Its contents are as follows:
Copy Code code as follows:
#Uncomment or ADD only the keys, you
Method One, local login mysql, change "MySQL" Database in the "User" table in the "host" item, "localhost" changed to "%"
#mysql-U root-proot
Mysql>use MySQL;
Mysql>update User Set host = '% ' where user = ' root ';
Mysql>select host, user from
Basic concepts
Defined:
The binary log contains all the statements that have updated the data or have potentially updated the data (for example, a delete that does not match any of the rows).
Role:
1. The primary purpose of the binary log is to
The following is an example code that stores exception information in the log table when an exception occurs, and continues to run subsequent statements.
If you have any better suggestions, please do not hesitate to enlighten me.
Stored procedure
MySQL is a powerful open source database. With more and more database-driven applications, people have been pushing MySQL to its limits. Here are 100 tips for adjusting and optimizing MySQL installation. Some of the tricks are specific to the
First, the purpose: the main server in the MySQL database synchronization to the server, so that the operation of the primary server can be updated immediately from the server, to avoid the main server due to the environment or network abnormal
1. Calculation of years
You want to figure out how old this person is by birthdays.
Copy Code code as follows:
SELECT Date_format (From_days to_days (now ())-To_days (@dateofbirth)), '%Y ') + 0;
2. Two difference in time
1. To operate the MySQL server at a command prompt, add system variables. (Computer-System Properties--environment variable--path)
2. Query the data in the data table;
Select Selection_list SELECT */columns
From Table_list to Table1/table2
Compiling the installation software often encounters problems, especially when the software that compiles the lamp works together, especially if the software that was previously installed affects the compilation of the program behind it, which is
MySQL Table subqueryA table subquery is a table data in which the result set returned by a subquery is n rows n columns.MySQL Table Sub-query instanceHere are two raw data tables for the example:Article table:
Blog table:
SQL is as follows:
From child querysubqueries in the FROM clauseThe MySQL from subquery refers to the FROM clause as a subquery statement, and the main query to the subquery results to obtain the required data. The FROM subquery syntax is as follows:
SELECT ...
MySQL Query and use of the in, any, SOME, and all operatorsMySQL QueryAn in-line query is the result set returned by a subquery that is a column of N rows, usually from a field query returned to a table.An example of a column subquery is as follows:
Copy Code code as follows:
#创建触发器, when you add a record to the order table, update the goods table
Delimiter $
CREATE TRIGGER Trigger1
After INSERT on ' order '
For each ROW
BEGIN
UPDATE goods SET Num=num-new.much WHERE
MySQL Insert into Add dataINSERT intoINSERT into syntax is used to add data records to a datasheet.Grammar:
INSERT into Tb_name VALUES (value1, value2,...)
This syntax indicates that data records are inserted sequentially into all
Taking the mysql_query () function as the basic prerequisite for the tutorial, let's take a look at the use of mysql_query ():mysql_query () functionPHP MySQL function library, the mysql_query () function is used to send and execute SQL statements
What is the difference between a clustered index and a nonclustered index in MySQL?
In MySQL, the InnoDB engine table is the (clustered) Index organization table (clustered index organize), and the MyISAM engine table is the heap organization table
Mysql Query Cachethe effect of query caching is that when a query receives a query that is the same as before, the server retrieves the results from the query cache, rather than parsing and executing the last query again. This greatly improves
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