1. Description of the problemA situation in which the lock table may be encountered during the use of the database, resulting in timeouts when other processes access the same table. Specifically, use the following command in MySQLSHOW
Method One: If the previous data are not required, you can directly empty all the data, and the self-increment field recovery starting from 1 countTRUNCATE TABLE nameMethod Two: The DBCC CHECKIDENT (' table_name ', reseed, new_reseed_value) Current
1. Set character encodingEnter the command:[Root@localhost ~]# vi/etc/my.cnfLast line join: Default-character-set=utf8, Save!2. Start the MySQL service:Enter the command:[root@localhost ~]# Service mysqld startReturning information indicates that it
Com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:You has an error in your SQL syntax; Check the manual, corresponds to your MySQL server version for the right syntax to use near ' U–ì€?ú?] Qs\0¥?c§?wb??? ? ú??h? A?nc?? W G ù+\ ', yóxè2o?2§w.
MySQL maximum number of connections by default is only 100, when users access to a database with the site or forum, will cause the MySQL service CPU usage increases, and can not provide services.[[Email protected] ~] #vim/etc/my.cnfLocate the
Logical backups are typically used for data migrations or data volumes, and logical backups are backed up by data exports.If you need to export all databases, the command is as follows:Mysqldump-uroot-p--single-transaction-a>all.sqlIf you want to
Binary types include binary, VARBINARY, BIT, Tinyblob, BLOB, Mediumblob, Longblob binary (M) types, save bytes instead of characters, no character set limit, byte number is M, allow length of 0 ~m a fixed-length binary string. Less than the maximum
Background:long time to the computer, resulting in "delirious", accidentally in MySQL under the wrong operation of "revoke all on * * from ' root ' @ ' localhost '; ", this command means removing all permissions from the highest-privileged user root
When querying the database, it is sometimes necessary to sort the results of the query according to a word orderby or descending order, or even the ascending order of a certain two fields in some cases. If you are arranging by a field, you only need
Create a functionDelimiter//Create functionFunction_name ([Parameters])returnsReturn_typebeginDo your WorkEnd//delimiter; Description:1.//can be replaced with $$2the last sentence has a space between the delimiter and the semicolon.3Each parameter
Originally used in Java read file processing format after the database, run, found that the efficiency is too low, 4G text, more than 40 million lines, estimated to take about 30 days to complete processing.Data format:Each line, XXXX | | | XXXXXXX |
Read large files to mysql
At first, I used the java Read File Processing format and stored it in the database. After running the command, I found that the efficiency was too low and too low. 4G text and more than 40 million lines. It was estimated
Mysql Study Notes 10 (mysql operator)
The operators provided by mysql include Arithmetic Operators, comparison operators, logical operators, and bitwise operators. Arithmetic Operators include: +-*/% 1. After obtaining various arithmetic operations,
MySql Common commandsMysql Common commandsI haven't been writing a blog for a long time. It's time to write a summary of what I 've learned recently.Today, we will summarize some common mysql commands:Login: mysql-uroot-p-P3306-h ---- (-u indicates
MySQL inserts fields with the same value as the auto-increment primary key and ensures data accuracy at high concurrency.
Scenario: Table t2 contains an auto-incrementing primary key id and field v. When a record is inserted, the values of v and id
Mysql study note 5 (trigger)
Trigger is one of mysql database objects. This object is very similar to functions in programming languages and must be declared and executed. However, trigger execution is not called by a program, it is not manually
[MySql fast insertion of large data volumes and statement optimization]
INSERTStatement speed
The time required to insert a record is composed of the following factors, and the number indicates the approximate proportion: Connection: (3) Send the
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