1. Benefits of starting multiple mysql instances on a single machine
Make full use of the computing power of a single machine
It can effectively allocate different logics to different mysql databases to improve the parallel processing capability of
MySQL uses an overhead-based optimizer to determine the optimal solution for processing queries. In many cases, MySQL can calculate the best possible query plan, but in some cases, MySQL does not have enough information about the data and has to
I. Preparations
To integrate the Linux/Apache/PHP4/FastCGI/Oracle/MySQL environment, you must first prepare the following software packages:
(1) database Perl Interface
1. perl5 Oracle dbi driver: DBD-Oracle-1.03.tar.gz
2. perl5 universal database
Database index is a Sort data structure in the database management system. It helps you quickly query and update data in database tables. The implementation of indexes usually uses the B tree and Its Variant B + tree.
In addition to data, the
I found some information, and then I used the two functions concat () and left () in MySQL string processing ()
1. [CONCAT (str1, str2 ,...)
Returns a string from the parameter link. If any parameter is NULL, return NULL. There can be more than
Returns the number of affected rows in the previous statement! Similar to @ ERROR, each statement is reset after execution. If it is used in the future, you need to save the variable to a local variable. Any statement not returned sets this variable
Aggregate functionsSUM ()
COUNT function -- COUNT ()
MAX/MIN functions-MAX ()/MIN ()
Mean function-AVG ()
-----------------------------------------
Group by is a GROUP query. Generally, group by is used with Aggregate functions.
You use group by to
For mysql to use select for update, it must be for InnoDb and be in a transaction.
The select conditions are different. The Row-level locks and table-level locks are also used.
Because InnoDB defaults to Row-Level Lock, MySQL will only execute Row
When using MySQL, you must pay attention to security issues. The following are 23 notes for MySQL:
1. If the connection between the client and the server needs to span and pass through an untrusted network, you need to use an SSH tunnel to encrypt
Because log files are an important reference for restoring database data, maintenance of log files is also very important. When MySQL is used together with log files, you sometimes want to delete/back up old log files and tell MySQL to start
Abstract:MySQL database has excellent performance as a network database, but it is rarely used in application software. This article will mainly discuss the application of two database interfaces (odbc api and c api) provided by MySQL in VC, and
Oracle is a relational database management system with powerful functions and excellent performance. It plays an important role in today's large database management systems. Under normal circumstances, the Oracle database ensures data security and
Regular Expressions (regex) are a powerful tool for defining complex queries.Here is a simple document, which ignores some detailed information.A regular expression defines a string rule. The simplest regular expression does not contain any reserved
The mysqlcheck client can check and repair the MyISAM table. It can also be optimized and analyzed.
The function of mysqlcheck is similar to that of myisamchk, but it works differently. The main difference is that mysqlcheck must be used when the
1. Cause Analysis of Table CorruptionThe following are common causes of mysql table destruction:1. Data Files are damaged due to a sudden power failure on the server.2. Force Shutdown without shutting down the mysql service first.3. The mysqld
1. MySQL Common commandsCreate database name; create a databaseUse databasename; select databaseDrop database name directly deletes the database, no reminderShow tables; displays tablesDescribe tablename; Detailed description of the tableAdd
Operating System: DEBIAN Linux 3.1.
MYSQL database version: 5.0.27
(1) log on with the system root permission
(2) Stop the MYSQL server:
Mysql. server stop
(3) skip the authorization table and execute the MYSQL server:
Mysqld_safe --
Where condition Query
The Code is as follows:
Select * from news where DATE (adddate)
'2017-04-20 '-INTERVAL 5 DAY and '2017-04-20' + INTERVAL 5 DAY
Select * from news where DATE (adddate) in ('2017-04-20 ', '2017-04-15', '2017-04-25 ')
Use of IF
To put it simply, SQL injection refers to the process of passing SQL code to the application, but it is not inserted as scheduled or expected by application developers, A considerable number of programmers did not judge the legitimacy of user input
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