About data input in the database ----------------- SELECT... the inverse operation of LOADDATAINFILE in INTOOUTFILE. we generally use insertintotable_namevalues (); to add records to the data table. this is a method. of course, you can also use the
Mysqlimport Example: mysqlimport-uroot-p123456 test/tmp/mytbl.txt; Convention: the last part of the file name is the table name. The database must be specified when the preceding statement is imported to the mytblmysqlimport table.
Import CSV
This article mainly introduces someMySQL databaseOfCommand LineSome Common commands, including starting and stopping services, user logon, user management, and use of commonly used batch processing commands. Let's take a look at them.
Start and Stop
We use the current my-sql to compare the new version of my SQL 5.0 version. First, how to get my SQL 5.0 we can download from the Internet ([Url]www.mysql.cn[/url]).Let's look at how to install my SQL to support multiple platforms, that is, it can
I've got about 200,000 data inserts in my job, after the completion of the program to find the running timeout, modify PHP maximum execution time to 600, or timeout, check out before the number of data inserted before the calculation, probably to
INSERT the speed of the statementThe time required to insert a record is made up of the following factors, where the number represents the approximate scale: Connection: (3) Send query to server: (2) Analysis query: (2) Insert record: (1x record
Batch processing is a non-interactive way to run mysql programs. Like the commands you use in mysql, you will still use these commands. To implement batch processing, you need to redirect a file to the mysql program. First, we need a text file
Usage of mysqlloaddatainfile (importing 40 W data to mysql in 3-5 seconds) bitsCN.com
If you want to import Chinese data, the utf8 character set in mysql will save the UTF-8 character set for the xxx.txt file you want to import. the command load
Backup is the simplest way to protect data. This section describes multiple backup methods. To get a consistent backup, make a lock tables lock on the relevant table. You only need one read LOCK. When you copy a file in the database directory, this
SQL-mysql common operation statements (Entry level), sqlmysql
1. Enter the database:
Mysql-u root-p
Mysql-h localhost-u root-p database_name
2. List Databases
Show databases;
3. Select a database:
Use databases_name;
4. List data tables:
Show tables;
The speed of the insert query:
The time to insert a record consists of the following:
Connection: (3)
Send query to server: (2)
Analysis of the query: (2)
Insert Record: (1 x record size)
Insert Index: (1 x index)
Off: (1)
The numbers here
MySQL Performance tuning:
The speed of the insert query:
The time to insert a record consists of the following:
Connection: (3)
Send query to server: (2)
Analysis of the query: (2)
Insert Record: (1 x record size)
Insert Index: (1 x index)
MySQL Common operation statement1.mysql-u root-p 2.mysql-h localhost-u root-p database_name2. List the databases:1.show databases;3. Select the database:1.use Databases_name;4. List the data tables:1.show tables;5. Display the properties of the
INSERT query speed:
The time for inserting a record is composed of the following:
Connection: (3)
Send query to server: (2)
Analysis query: (2)
Insert record: (1 x record size)
Insert index: (1 x index)
Close: (1)
The number here is a bit
INSERT query speed: the time when a record is inserted is composed of the following: (3) Send a query to the server: (2) analyze the query: (2) INSERT a record: (1x record size) insert index: (1x index) Disabled: (1) the number here is a bit
Document directory
Mysqldump Backup Tool
Cold backup:
The cold backup of the InnoDB Storage engine is very simple. You only need to back up frm files, shared tablespace files, independent tablespace files (*. IBD), and redo log files of the
Step-by-step explanation of MySQL database performance adjustment MySQL performance adjustment:
Insert query speed:
The time for inserting a record is composed of the following:
Connection: (3)
Send query to server: (2)
Analysis query: (2)
Insert
SELECTintooutfile backup database data bitsCN.com
SELECT into outfile backup database data select email into outfile "test.txt" from email; select substring (boss,), addr from guest; load data [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE "/opt/abc.txt"
MySQL hangs the Debugs1. Attaching to MySQL[Email protected]: gdb-p 12321232 is the PID of MySQL2. Show current thread(GDB) Info threads3. Show backtracking for all threads(GDB) thread apply all BTMySQL BINARYMysql> SELECT * from tbl_4;+----+-------+
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.