2 months ago, the company's test server to the DBA was retracted, have been with the development of a group of DB, some need to test the small features, the need to constantly restart the DB, in order not to affect the development colleagues, they
The company uses the Master-slave structure, on the concrete study under, here records the related content.
The benefits of replication
Read-write Detach: The primary database is responsible for writing and update data and reads from the
Bulk Delete Multiple tables
Delete all pre_ prefixes table
The code is as follows
Copy Code
SELECT CONCAT (' drop table ', TABLE_NAME, '; ') from Information_schema.tables whereInformation_schema.tables.TABLE_NAME like '
(1) To improve the database insert performance Central idea: as far as possible to write data to the database file and reduce the checkpoint operations. The following four configuration entries were modified this time:1) Set the
The MySQL alter syntax is as follows:
ALTER [IGNORE] TABLE tbl_name alter_spec [, Alter_spec ...]
Alter_specification:
ADD [COLUMN] create_definition [a] After column_name]
or ADD INDEX [index_name] (index_col_name,...)
or ADD PRIMARY
Docker is the latest hot technology, the technology industry is a network of red. In the nature of the technical people toss, try to change the local MySQL server to use Docker execution, this article records toss process, to make a memo.
The steps
The MySQL ALTER TABLE statement can modify the basic structure of the table, such as adding fields, deleting fields, adding primary keys, adding indexes, modifying field data types, renaming tables, and so on, and this article introduces the use of
When we design the database table structure, we need to pay attention to the performance of the data operation when we operate the database (especially the SQL statement when we check the table). Here, we don't talk too much about the optimization
Recently in the study of PHP, want to record their learning experience, and write some experience, only for reference exchange. This article is suitable for those who just contact PHP, want to learn and want to build their own nginx+php+mysql
In MySQL, the code test passes with a while statement loop that differs from SQL Server.
Method of using the while statement to generate data in MSSQL:
Sample code:
Copy Code code as follows:
DECLARE @a int
Set @a = 1
While @aBegin
The most effective way to optimize group by IS to use the index directly to get the field that requires the group completely. When using this access method, MySQL uses the type of index that the keyword sorts (for example, the Btree index). This
If you have previously installed MySQL, unload load, you will most likely encounter "a Windows service with the name MySQL already exists." Such a hint. That is, the service already exists.
We can view it in the Window Task Manager----service and
The MySQL manual also has the server-side parameter explanation, as well as the parameter value correlation explanation information, now is for us everybody important attention, needs to modify or affects the performance the server side parameter,
This article starts at
InfoQ Chinese Station。
Author: Munling (Dragon), fenng.Note: To reprint friends, please pay attention to the first author of this article!
This article is a summary of what he did after a dragon friend came to discuss it.
MySQL from 5.0 to support the stored procedures and trigger, we like to use MySQL friends more like the reason for MySQL, grammatical and pl/sql differences, but have been programmed to know that the grammar is not a problem, the key is the idea,
MySQL's sqrt function is used to compute any number of square roots. You can use the SELECT statement to find any number of square verification roots as follows:
Mysql> Select SQRT (a);
+----------+
| SQRT () |
+----------+
| 4.000000 |
+----
Work needs to be promoted from the library to the main library, but the data consistency from the library and the main library is not guaranteed, so usePt-table-checksum work to check the master-slave consistency, before the operation needs to be
1. Only convert the database (the tables and data in the two databases are the same, but the data is converted from sqlserver to mysql)The process of importing data from Microsoft SQL server 2008 to mysql 5.5 is not as simple as
Let's explain what LAMP is. As the title says, LAMP is actually the abbreviation of Linux, Apache, MySQL, and PHP. Of course, the last "P" is also known as Perl or Python. Needless to say, this article explains four things: Linux, Apache, MySQL, and
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