Copy Code code as follows:
/**
@Usage: Use some storage (MySQL or memcache) instead of PHP Sessoin
@author: Lein
@Version: 1.0
*/
Session_Start ();
if (!isset ($_session[' test ')) {
$_session[' test ']= "123_lein_". Date ("y-m-d h:i:s");
The segmented fields must be finite and small in number, and we cannot store infinitely many characters in a stringThe table that this field belongs to has a one-to-many relationship with the table associated with this field.For example, the
They will discuss statements that return data, such as inserts and statements that do not return data, such as update and delete. They will then write a simple program that retrieves data from the database
Execute SQL statement
Now that we have a
(1) Improve the database insert performance Central idea: Try to write data at once to file and reduce the checkpoint operation of the database. The following four configuration entries were modified this time:1) Set the
DROP TABLE IF EXISTS [Temp_table_name];
Create temporary table [Temp_table_name] Select Col1,col2,... from [table_name];
ALTER TABLE [Temp_table_name] Add unique idx_col1 (col1);
Through the above operation, the warning problem occurs many times.
Acid:atomic, consistent, Isolated, durable
The store program provides an excellent mechanism for defining, encapsulating, and managing transactions.
1,mysql Transaction Support
1 The MySQL transaction support is not tied to the MySQL server itself,
The reason that MySQL appears garbled
To understand why there are garbled, we must first understand: from the client request, to MySQL storage data, and then the next time from the table to retrieve the client process, which links will be
MySQL installation directoryDatabase directory:/var/lib/mysql/Configuration file:/usr/share/mysql (mysql.server command and configuration file)Related commands:/usr/bin (mysqladmin mysqldump, etc. order)Startup script:/etc/init.d/mysql (Directory of
Linux set MySQL and allow external machines to access sudo vi/etc/my.cnf
The specific directory is specific circumstances, some people are installed in the personal directory, then find the corresponding directory can be.
I. Modification of the
The recent use of MySQL database has encountered many types of numbers, mainly int,bigint,smallint and tinyint. Among them, the difference between int and smallint is confusing. Today on the internet carefully looked for, find the following content,
One, background
Before using SQL Server for table partitioning, there were a lot of questions about unique indexes: Step8:sql Server When table partitions encounter a unique constraint, I did not think that in the MySQL partition will encounter the
xtrabackup------MySQL DBA's Prerequisite tools
Attention:
1) document reference Http://www.percona.com/docs/wiki/percona-xtrabackup:start
2 MySQL to use 5.1.50 version or above.
Introduction and installation of Xtrabackup
1, Xtrabackup is a
The Min function of MySQL is used to find a record of the minimum value of a recordset.
To understand the Employee_tbl table that the Min function considers has the following records:
Mysql> SELECT * from EMPLOYEE_TBL;
+------+------+-------
MySQL's subquery optimization has been not very friendly, has been criticized by the industry more than I have encountered in the SQL optimization of one of the most problems, you can click here, here to get some information, MySQL processing
Hidden danger: If the cookie of the client machine is invalidated by the virus, then the session is equivalent to No.
Hidden Danger two: Session in PHP is the default in the form of files stored in a temporary folder, for a small system, this can be
1. Preparatory work
Download MySQL's latest installation-free version mysql-noinstall-5.1.53-win32.zip, extract to related directories, such as: d:\\ Mysql-noinstall-5.1.53-win32. This is the root directory of MySQL.
2. Configure
There are
In MySQL, there are two field types that are confusing, that is, text and blobs, especially bloggers who write their own blog do not know to change to their own blog positive text segment select text or blob type.
Here are a few differences:
I.
Recently learning Java and database, think of the previous written student management system, are downloaded from the Internet, perfunctory. There is nothing to do, but also write their own one, but not many functions to achieve.
Development
MySQL parameter optimization for beginners, is more difficult to understand things, in fact, this parameter optimization, is a very complex thing, for different sites, and its online volume, access, number of posts, network conditions, as well as
On the internet to find a piece of MySQL technical article, feel good, translate it to share under.Original Author: Mike PetersI've sorted out 7 ways to fix the MySQL database, when a simple reboot doesn't work for the database, or when a table
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