In general, when our database data exceeds 100w records, we should consider the table or partition, this time I would like to elaborate on some of the methods of the table. First of all, we need to think about how many tables in the end, the premise
Because the domestic MySQL resources are more tense, foreign is not too slow, is not open to our users. So, in the days without MySQL, we want to do something convenient for others and improve their own site, it is more difficult than heaven, in
This article mainly introduces in inserting the data to the table to encounter the key duplication avoids inserting the duplicate value the processing method, mainly relates to Ignore,on DUPLICATE key update,replace; then look at the three ways to
An error like this cannot create a. frm file seems to imply incorrect permissions or other reasons for operating system files, but in reality, this MySQL error has been reported as a bug in MySQL itself and has been in the MySQL developer list for
First take a look at the simplest example, in test, add a field, the field name is birth, the type is date type. Mysql> ALTER TABLE test add column Birth date;Query OK, 0 rows affected (0.36 sec)records:0 duplicates:0 warnings:0 Check the data and
If you're running a Web application that uses MySQL, it's a great opportunity to keep passwords or other sensitive information in your application. Protecting this data from hackers or prying eyes is an important concern because you cannot allow
We continue to use the previous example. The table previously established contains some basic information about the employee, such as name, sex, date of birth, place of birth. We'll create a table that describes the articles published by the
The example described in this article successfully implements the dynamic row-column. Below I take a simple database as an example, illustrate.
Data table structure
Here I use a relatively simple example to illustrate, is also a classic example of
Replace the character 10005 in the field userid in the Ubk_vhost_list table with 10010
UPDATE ' table_name ' SET ' field_name ' = replace (' Field_name ', ' from_str ', ' to_str ') WHERE ' field_name ' like '%from_str% '
The difference between MySQL semi-synchronous replication and asynchronous replication as shown in the previous schema diagram: In the case of MySQL asynchronous replication, MySQL master server transfers its own binary log through the replication
MySQL BETWEEN UsageMySQL BETWEEN SyntaxThe BETWEEN operator is used in a WHERE expression to select a range of data between two values. BETWEEN is used in conjunction with and syntax as follows:
Where column BETWEEN value1 and value2
where
1 General Error Yum installation method:
In the previous article described in the CentOS 6.5 system in the Yum way to quickly build the LNMP environment, then can also be in the CentOS 7 or CentOS 7.1 system in accordance with gourd painting ladle
1, connect MySQL
Format: mysql-h host address-u user name-P user Password
1, connected to the MySQL on the computer.
First open the DOS window, and then enter the directory Mysql\bin, and then type the command Mysql-u root-p, enter after the
Production system with the business growth will always experience a business volume from small to large process, scalability is to consider the high availability of database system is an important indicator; in Tanku/database data volume is too
1, hardware layer-related optimization
1.1. CPU Related
In the server's BIOS setup, you can adjust the following configurations to maximize CPU performance or avoid classic NUMA issues:
(1), select Performance per Watt optimized (DAPC) mode, play
The describe command is used to view detailed design information for a specific table
For example, to view the design information for the guestbook table, use:
Describe Guestbook
describe Ol_user userid
Second, you can view the
MySQL has different types of log files (each store a different type of log), from which you can query what is done in MySQL, for the management of MySQL, these log files are indispensable.1. Error log: Log the database startup, operation and stop
1.pt-archiverFunction Introduction:Archive records from tables in a MySQL database to another table or fileUsage Introduction:Pt-archiver [OPTION ...]--source DSN--where whereThis tool simply archives old data and does not have much impact on OLTP
System Class Tools1. Pt-diskstatsFunction Introduction:It's an interactive monitoring tool for Gun/linux.Usage Introduction:Pt-diskstats [OPTION ...] [FILES]Printing disk IO Statistics for gun/linux is a bit like iostat, but the tool is interactive
MySQL development to today, the InnoDB engine has as the absolute main force, in addition to such as large data analysis and other specific needs of the field, it applies to many scenarios. However, there are still a lot of developers in 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