The following error occurred while executing a simple DESC statement:
mysql> desc ZAGCNY;Error 1030 (HY000): Got error from storage engine
The literal meaning is: get error%d from the storage engine
By searching, the approximate reason for this
The simple requirement is to read a piece of data from a table, and then modify the data to insert the same one.
Table (assuming two table structures)
INSERT into new tableSELECT * from old tableCopy data from old table to new table (assuming two
We all know that pagination will definitely use both types of sql:(1) Select COUNT (*) from table where condition(2) SELECT * FROM table where condition (page number-1) * per page When the volume of data is a large (hundreds of W), no matter what
1.like and in bulk delete specified records
Like grammar
Like is mainly used to blur the query
sql = "Delete from A where field like '%abc% '" This can be used for characters and numbers
In syntax
sql = "Delete from A where field ID (1,2,3)"
Analysis 1:
Did you set the permissions for each directory after you installed MySQL?Like what:Chown-r Root.Chown-r MySQL DataChgrp-r MySQL.
Analysis 2:
Finally looked at the next disk usage, if the hard disk space is not enough, we need to
An If expression
IF (EXPR1,EXPR2,EXPR3)
If Expr1 is true (expr1 <> 0 and Expr1 <> NULL), then the return value of if () is expr2; Otherwise, the return value is EXPR3. The return value of IF () is a numeric value or a string value, depending on
INSERT INTO SELECT syntax
Statement form: Insert into Table2 (field1,field2,...) Select Value1,value2,... from Table1
Example
The code is as follows
Copy Code
Insert into User1 (name,address,phone) select
Perform a scheduled backup script when adding crontab tasks from the library server
The code is as follows
Copy Code
#crontab-E
Add the following:
The code is as follows
Copy Code
1
Master configuration:
The code is as follows
Copy Code
Log-bin = Mysql-binServer-id = 1Binlog-do-db = Powerdns #要同步的数据库
Master new Slave Account:
The code is as follows
Copy Code
Sometimes large inserts and updates are limited by max_allowed_packet parameters, resulting in failure.
This value is set to cause a single record to exceed the limit and write to the database fails, and subsequent record writes will fail.
The
The length function inside MySQL is a built-in function to get the length of the string. Examples of specific uses are as follows:
(1) To see the length of a string (such as the site)
SELECT LENGTH (' www.111cn.net ');
(2) Query article table
In MySQL, the default text field is sorted by the first character of the text field, that is, if a table structure is as follows:
If you sort the field by default for this text type, such as SELECT * FROM table ORDER by F1 ASC. The results
Example One
The code is as follows
Copy Code
Grant all privileges on wxtest.* to root175@111.34.73.175 identified by ' 11111 '
Add a root175 user, password is 11111, can only login on the 111.34.73.175, and the
1. Calculation of years
You want to figure out how old this person is by birthdays.
The code is as follows
Copy Code
SELECT Date_format (From_days to_days (now ())-To_days (@dateofbirth)), '%Y ') + 0;
2. The
Unknown command ' "'
So the ' replace all ' result or not, the import is not.
However, it is possible to copy the database files directly to the past. Copy the past after the dump came out. The result is still the same effect
Unknown command ' "'
First step
Delete the My.ini under C:windowns
Second Step
Open C:mysqlbinwinmysqladmin.exe Enter user name and password
The third step in DOS input mysqld-nt-remove Delete Service
Then enter the Mysqld-nt-install
Step Fourth enter MySQL to
[Root@aslibra www.aslibra.com]# mysql-s/data/www.aslibra.com/mysql/mysql.sock-uadmin-ppasswordWelcome to the MySQL Monitor. Commands End With; or G.Your MySQL Connection ID is 322891Server Version:5.5.2-m2-log Source Distribution
Type ' help, ' or '
MySQL Tutorial too many connections
Solution:
1. Join try/catch/finally where you use MySQL data source
2. Check whether the mysqlconnection after use to do close ()
3. Do not make the mysqlconnection connection static, each connection creates a
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