Share a little of my experience here
When you first started learning SQL, you would write this
Copy Code code as follows:
SELECT * FROM table order by ID LIMIT 1000, 10;
But when the data reaches millions, the writing slows
For specific details, please see the following small set of knowledge points brought to you.
Similar to the writing program, the stored procedure also has a corresponding conditional judgment, the function is similar to if, switch. In MySQL it
When multiple Web sites share a MySQL database, in order to make the database management is not confused, the general use of different sites using different prefix names to distinguish. And how do you batch modify the prefix name of an existing
Query current data for this week
SELECT name,submittime from Enterprise WHERE yearweek (Date_format (submittime, '%y-%m-%d ')) = Yearweek (now ());
query last week's dataSELECT name,submittime from Enterprise WHERE yearweek (Date_format
Brief Introduction
Xtrabackup is the MySQL database Backup tool provided by Percona, according to the official, this is also the world's only one by one open source to be able to the InnoDB and XTRADB database hot standby tool. Characteristics:
(1)
There are two main ways to handle MySQL transactions.
1, with Begin,rollback,commit to achieve
Begin a transaction
ROLLBACK TRANSACTION Rollback
Commit TRANSACTION Confirmation
2, directly with the set to change the MySQL automatic submission
Directory
There are three common ways to install MySQL:
RPM Package Form
Universal binary Form
Source code Compilation
1,rpm Package Form
(1) The operating system publisher provides
(2) MySQL officially provided (version update, fixed more
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
First, InnoDB row lock classification
Record lock: Records locks, which is just a single line locked
Gap Lock: An interval lock that only locks an interval (note that the interval here is open, i.e. excluding boundary values.)
Next-key Lock:record
For security reasons, the database needs to be backed up frequently, or restored. For MySQL, the most convenient way may be to use the phpMyAdmin export, import functionality, but if your database volume is larger, as a WEB application phpMyAdmin
This morning in the creation of a table Primay key in the process of a power outage, when the computer started again, found that the MySQL service failed to start, using net start hint 1067 error, toss 2 hours can not be resolved, and then only by
Background
We use MySQL to store all the data for FriendFeed. The database has grown a lot as the user base grows. There are now more than 250 million records stored with a bunch of other data covering from comments and "like" to the buddy list.
We installed the MySQL plainly is a database management tool, the real value is that the data relational database data is in the form of tables, n tables are summarized together into a database now look at the basic operation of the database
Nothing
1.
Now the project (not SRC) right key--build path--add External Archives, select the driver of the jar package, this is release version, the bin directory is the debug version.
Example in the docs under the connector-j.html, there are examples
root@db-02 ~]# mysql-u Root-bash:mysql:command not found
Reason: This is because the system by default will look for commands under/usr/bin, if this command is not in this directory, of course, will not find the command, we need to do is map a link
Recently always to initialize data for this project, make a lot of headaches, and the database ID become more and more, to let the self-increase starting from 1: Then use the following method:
method One: If the previous data is not needed, you can
MySQL Connection query I believe we all have some understanding, the connection query is in the database query operation often used, the following is to introduce you to the MySQL connection query
MySQL connection query: support multiple Table
First, introduce the type of index
MySQL Common indexes are: Primary key index, unique index, normal index, FULL-TEXT index, combined indexPRIMARY key (primary key index) ALTER TABLE ' table_name ' Add PRIMARY key (' column ') unique (unique index)
When troubleshooting a deadlock problem for a customer, I encountered an interesting case involving a InnoDB clearance lock. I expect that the transaction should not have a lock for a WHERE clause does not match any of the rows, but I was wrong. Let'
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