Introduction: Why the introduction of transactions?
1>. Data Integrity
2>. Data Security
3>. Make full use of system resources to improve the ability of system concurrent processing
1. characteristics of the transaction
Transactions have four
1. Basic Query StatementSelect Property List from table name and view list [where Condition expression 1] [Group BY property name 1 [having conditional expression 2]] [ORDER BY property name 2 [Asc|desc]]2. Single-table query1) Use * query all
Business background:The basic business scenario is that the request data (vehicle VIN information) goes into the interface, you need to determine its state in the database, if the VIN does not exist in the library, or if the VIN status is 1
First stop the MySQL service:
Copy Code code as follows:
root@webserver:/home/webmaster# service MySQL Stop
Then recreate a MySQL service using the Ignore Password Authentication mode:
Copy Code code as follows:
Mysqldumpcommand-line Export database:1, into the MySQL directory under the Bin folder: cd MySQL to the Bin folder directoryAs I entered the command line: CD C:\Program files\mysql\mysql Server 4.1\bin2, Export database: Mysqldump-u user name-p
No more nonsense to say, directly to everyone paste code.
1, Digital Auxiliary table
Create a table CREATE TABLE test (ID int unsigned NOT NULL primary key);
Delimiter//CREATE PROCEDURE pnum (CNT int unsigned) begin declare i int unsigned
Operation of the database will inevitably because of "careless" and wrong operation, need to restore the words through backup to restore is unlikely, because the need to restore and binlog poor to recover, can not wait, very time-consuming. Here is
These days to toss MySQL server, so on the internet to collect some maintenance strategies, and then summarize their own experiments, the following is my experience and some of the suggestions of others.
Log type:
MySQL has several different log
MySQL development to today, the InnoDB engine has as the absolute main force, in addition to such as large data analysis and other specific needs of the field, it applies to many scenarios. However, there are still a lot of developers in the
MySQL's default encoding is Latin1, does not support Chinese, to support Chinese need to change the database's default encoding to GBK or UTF8.
1, need to log in as root user can view the database encoding (as root user login command: >mysql-u root–
Start a connection using MySQL binaryyou can use MySQL binary to enter the MySQL command prompt to connect to the MySQL database.InstanceThe following is a simple example of connecting to a MySQL server from the command line:
[root@host]#
View MySQL database tablesEnter the MySQL Command line clientTo view the database currently in use:
Mysql>select database ();
mysql>status;
Mysql>show tables;
Mysql>show databases;//can see which databases are available, return the database
This example describes a method that Php+mysql counts the number of records in each table in the library and in descending order. Share to everyone for your reference, specific as follows:
This is a simple piece of code that enables you to count
Burst field length
ORDER BY num/*
Matching fields
and 1=1 Union Select 1,2,3,4,5.......n/*
Storm field position
and 1=2 Union Select 1,2,3,4,5.....n/*
Using built-in functions to storm database information
Version () database () User ()
No
Profiling is a very useful MySQL performance analysis tool, today to test the profiling function. Thanks for the blog with Love Rose:
The main purpose of the MySQL SQL Performance Analyzer is to show the usage of resources throughout the process of
An introduction
In the author supports the business process, often encounters the development consultation replace into the use scene as well as the attention matter, here makes a summary. Make a description from the functional principle,
The prompt command can display information about the current user, database, time, and so on at the MySQL prompt
Copy Code code as follows:
Mysql-uroot-p--prompt= "\\u@\\h:\\d \\r:\\m:\\s>"
After the setting is successful:
Occasionally to use PHP to do some MySQL database operation Test, write yourself too troublesome, the results of the search generally contains a lot of useless code, here will be PHP MySQL operation to do a summary, I hope that in the future when
The MySQL system creates temporary tables in memory (MEMORY) and disks (MyISAM), how do you know how many temporary tables are built on disk, and how many temporary tables are built in memory? You can learn from the following commands:
Mysql>
Why does the title have this name? Commen sence refers to things that everyone should know about, but often people will skip these things, or have a smattering of these things, today I summarize some of the commen sense types of problems I have
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