1, Software Environment:
Ubuntu 14.04.1 LTS (gnu/linux 3.13.0-32-generic x86_64)MySQL 5.6.27 x64
2. Method One
The easiest way to do this is to execute the command:
Copy Code code as follows:
# UPDATE-RC.D MySQL Defaults
Adding
There are many kinds of programs, I would simply say here:
1. Into outfile
Copy Code code as follows:
SELECT * FROM MyTable
into outfile '/tmp/mytable.csv '
FIELDS terminated by ', '
Optionally enclosed by ' "'
LINES
This article has shared several kinds of replication table structure, table data examples, details, please see below.
1. Copy table structure and data to new table
CREATE Table New Table select * from old table
This method copies all the contents
Today just need to configure the MySQL 5.5.45, because the database volume is very large, so must be optimized, or MySQL really unhappy.
(1), Max_connections:the number of simultaneous customers allowed. Increase this value to increase the number
On Weibo to discuss MySQL in the Delete large table Engine=innodb (30g+), how to reduce the time of MySQL hang, now do a simple summary:
When the Buffer_pool is very large (30g+), because the delete table, will traverse the entire buffer pool to
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
For their own backup, the experts please ignore.The data is too large, use the database client software to import the very card directly, or execute SQL directly.1, specify the file path.2, the fields are separated by commas, data rows are separated
Below through an illustrated way to explain the MySQL learning experience in the INSERT, UPDATE, delete records.
Insert Record
Copy Code code as follows:
Insert[]into] tb1_name[(col_name,.....)]
Automatically numbered
When using the MySQL database, you sometimes encounter situations where MySQL functions cannot be created. Here is a solution to the MySQL function can not create problems, for your reference.
Case one:
Currently, there was an error executing the
To summarize Lengbei in one sentence is to stop the database services, such as mysql,oracle, and then use a copy, package, or compression command to back up the data directory. If there is an exception to the data, you can restore it through backup
First, the main application of MySQL scenario 1, Web site system
2. Logging System
3. Data Warehouse System
4. Embedded system
Second, the MySQL frame composition:
Three, MySQL storage engine overview
1) MyISAM Storage Engine
The table for
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
An integrity constraint is a restriction on a field that conforms to the desired effect of the field, such as if the field contains a default value, cannot be null, and so on
Intuitive: If the inserted data does not meet the limit requirements, the
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
MySQL large table repeating fields How do I find it? This is a lot of people have encountered problems, below teach you a MySQL large table repeat field Query method for your reference.
There is a large table in the database, and you need to find a
Workaround:
The first step: to restore the database and tables are UTF8 format (recommended UTF8, of course GBK or gb2312 also line)
Copy Code code as follows:
CREATE DATABASE ' Shegongku ' DEFAULT CHARACTER SET UTF8
CREATE TABLE '
1. The timing of indexing: If a field in a table appears in Select, Filter, and sort criteria, it is worthwhile to index the field.
2. For a vague query like '%xxx ', a normal index is not satisfied and needs to be set up for Full-text indexing.
The situation is the case: there are now two tables, a team table and a people table, each people belonging to a team,people with a field team_id.
The following is a table statement:
Copy Code code as follows:
CREATE TABLE T_team
Mysqltuner Download Address: Http://github.com/rackerhacker/MySQLTuner-perl
Mysqltuner Use Method:Downloading and using Mysqltuner is actually a very simple process:
wget mysqltuner.plPerl mysqltuner.pl
If you ' d rather not invoke the Perl every
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