Often in the process of multiple process application development, we will inevitably encounter multiple processes accessing the same resource (critical resource), which requires synchronous access to the resource by adding a global lock (that is,
Overview
Many times, we need to know what SQL statements MySQL has executed, such as when MySQL is injected, need to know what hurt, and so on. As long as there is a record of the SQL statement, you can know the situation and make countermeasures.
Overview
Log files are an important part of the MySQL database. MySQL has several different log files, usually including error log files, binary logs, common logs, slow query logs, and so on. These logs can help us locate events within MYSQLD,
In web development, we often write some SQL statements, a bad SQL statement may make your entire program is very slow, more than 10 seconds, the average user will choose to close the page, how to optimize the SQL statements to run longer time SQL
The database engine you can use depends on how MySQL was compiled at the time of installation. To add a new engine, you must recompile MySQL. By default,
MySQL supports three engines:ISAM, MyISAM and heap 。
the other two types of InnoDB and Berkley (
There are two simple methods in MySQL to load data into a MySQL database from a previously backed up file.LOAD Data import:
MySQL provides the load data statement as a bulk load. The following is an example declaration that reads a file dump.txt,
We have seen the SQL SELECT command using the WHERE clause to fetch data from the MySQL table. However, when we try to give the condition to compare the value of the field or column to NULL, it does not work correctly.
To handle this situation,
Believe that most people have encountered too many instances of installing MySQL bar, I believe most people just find a multiple-instance installation tutorial will be easy to handle, but the more smooth installation process let us uneasy, why, when
command requirements for creating tables:
The name of the table
table field Name
Definition of each field
Grammar:
The following is a common SQL syntax to create a MySQL table:
CREATE TABLE table_name (column_name
InnoDB This engine is very different from the MyISAM engine. In particular, its data storage format and so on.
For a INNODB data structure, you first need to address two conceptual issues: shared table space and exclusive tablespace.
What is shared
In MySQL, you can query how many records are in a table from the Select COUNT (*) from TABLE_NAME. What should you do if you want to know the total number of records in a database? In this paper, two feasible Java programs are given to solve the
Received a MySQL server load alarm, up a look, load average are more than 280, with top look, the CPU ran to 336%, but IO and memory load is not high, according to experience, should be an index caused by the tragedy.
Look at the processlist and
mysql_fetch_* Column functionThe main function of the mysql_fetch_* column function is to obtain the relevant query results from the result set returned by the query, mainly including:
Mysql_fetch_array (): Gets a row from the result set as
Index-related
1. Query (or update, delete, can be converted to query) does not use the indexThis is the most basic step, requiring the SQL execution explain to see if the index is used in the execution plan, and focus on the Type=all, key=null
Most use WordPress built site, after the table are MySQL database, often we need to customize the function of WordPress, here we list 10 most useful wordpress database query, you need a database management tools, such as phpMyAdmin or NAVICAT, etc.
Usually there is a field in the table that creates date, and other databases have the option of default values. MySQL also has a default value of timestamp, but in MySQL, not only is the insertion of the modification will also update the value of
Problem:
When I look at the code of a previous developer, I see
WHERE p.name NULL
What does the symbol mean in this query? Is it the same as the = number? Or is it a grammatical error? However, no errors or exceptions are displayed.
In the process of using MySQL, there are some questions about the concepts of MyISAM and InnoDB, and the difference between the two engines has always been a question in my mind. To solve this puzzle, we searched the network and found the following
I. Overview
When the total number of MySQL records more than 1 million, there will be a significant decline in performance? The answer is yes, but the rate of performance degradation > is different, depends on the system's architecture,
I used the centos6,mysql let me complete a variety of problems, I would like to reload a new Mysql,yum remove mysql-server mysql install and can not get a clean MySQL, the original/etc/ My.cnf still unchanged, datadir inside the data has no change,
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