1. Data Files1) MyISAM Table: There are three related files, data file. MYD, index file. myi, target file (definition file). FRM2) bdb table: contains two files, one. DB data file and one. frm target file.3) InnoDB table: it has its own target file. frm, but the actual data is stored in the upper-level Directory, which belongs to the same level as the database.
2. Log FilesError Log: Under the directory c:/program files/
matches, ^ matches the beginning, the $ matches the end,. Match single character, [] match the characters in it (supported with-specified range), * match its preceding characters any number of times (I disagree when using *, because there may be problems when using *).Such as:Select ' Ssky ' ' [AB] ','Ssky's*';The result is:If by definition, the s* match does not match the KY, but the result is a return to True (1). Please advise me if you have any k
restart the MySQL database. In this case, the database upgrade in a simple environment is over.
the second, the same applies to any storage engine.
1. Also install the new version of MySQL first.
2. In the old version, back up the database.
# MKDIR/OPT/MYSQLSYSTEMS_BK; MYSQLDUMP-P3306-UROOT–TAB=/OPT/MYSQLSYSTEMS_BK mysqlsystems_com
The Note:–tab option
. It is important to note that the values in the INSERT statement above must be placed in pairs (...) for each record. In the middle, use "," split. Suppose there is a table table1
CREATE TABLE table1 (n INT);
If you want to insert 5 records into Table1, the following is the wrong way to write:
INSERT into table1 (i) VALUES (1,2,3,4,5);
MySQL will throw the following error
ERROR 1136:col
MySQL (Part 5)
1. bitwise operators
Bitwise operators are used to test, shift, or test bitwise in binary bytes. The bitwise operators provided in MySQL include: bitwise OR (|), bitwise AND (), shift by bit or (^), shift by bit left (
Operator
Function
|
Bit or
Bitwise AND
^
case, m should be an integer ranging from 1 to 255. It indicates the number of characters used to display the column's median. For example, mediumint (4) specifies a mediumint column with a display width of 4 characters. If an integer column with no specific width is defined, it is automatically assigned a default width. The default value is the length of the "longest" value for each type. If the printable expression of a specific value requires more
When MySQL sees the table, it encounters the Select storage Engine: MyISAM and InnoDB. What kind of storage engine is good?1, MyISAM: Table lock, support full-text index, read concurrency performance is good.2, InnoDB: Row lock, support transaction, support foreign key, write concurrency performance is good.In fact, most of the companies now, MySQL's rules are using INNODB as the default storage engine, in
MySQL (Part 5)Common operators 1. Arithmetic Operators
Operator
Function
+
Addition operation
-
Subtraction
*
Multiplication
/
Division
%
Remainder operation
2. Comparison Operators
Operator
Function
=
Equal
Security equals. Can be used to determine N
Tags: price BSP-table name div Add index LTE tableto view the index of a tableShow create table table name; Show index from table name; Show keys from table name;Add index ALTER TABLE name add index index name (index field); ALTER TABLE goods Add index price (shop_price);1.PRIMARY KEY (PRIMARY KEY Index)Mysql>alter TABLE ' table_name ' ADD PRIMARY KEY (' column ')2.UNIQUE (Unique index)
Description: There is a member table, there is a birthday field, the value is ' YYYY-MM-DD ' format, now to query a time period of the birthday of members, such as ' 06-03 ' to ' 07-08 ' in this time period of all birthday members.
SQL statement:
The code is as follows
Copy Code
Select * from user Where date_format (birthday, '%m-%d ') >= ' 06-03 ' and date_format (birthday, '%m-%d ')
Description: The commonly used time date processing function, the above
-called deadlock: refers to two or more than two processes in the course of execution, because of the competition for resources caused by a mutual waiting phenomenon, if there is no external force, they will not be able to advance. This is called the system is in a deadlock state or the system has produced a deadlock, these are always mutually aulympic process known as the deadlock process.second, the MySQL table-level lock lock Mode (MyISAM)
. which one is sequential and which one is random?
Therefore, if you want to optimize MySQL, you must have a good grasp of the hardware, OS, and internal implementation principles of MySQL. This article describes the CPU and process of MySQL optimization.
1. NUMA and SMP in CPU architecture
SMP: Shared Memory Mu
Marco's study Note 5-MYSQL preliminary 1. mysql
-U USERNAME
-P
-H MYSQL_SERVER
Linux: socket
Windows: memory
2. command category in interactive mode
Client commands
Server commands
Statement terminator is required. the default value is the block number.
3. relational database objects:
Table
Index
View
Constraints
Stor
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.