Sharding has two advantages: Static and Dynamic sharding and static sharding. They are simple, low development costs, and low maintenance costs.Common static sharding methods include Hash Functions and modulo operations, but this exposes a
Principle:
Hard link BasicsWhen multiple files point to the same inode, inode connections n> 1, deleting any file is extremely fast.This is because only the pointer to inode is deleted.
When n = 1, it is different. At this time, all data
(I) Environment:
OS: RHEL-5.8Server: MySQL 5.5Engine: InnoDB
(Ii) Problem:
Without any operation, the disk I/O load is almost full, and the disk load is still running for 3 or 4 hours.
Iotop partial output:
Total disk read: 32.55
Sometimes you need to modify the null field value of the returned column when querying the database's left and right connections, for example, return 1 or 0.
At this time, the coalese (field, 0) function will be used. This function will change the
After installing MySQL, you will receive the following prompt:
[Root @ localhost desktop] # rpm-IVH MySQL-server-5.5.28-1.rhel5.i386.rpmPreparing... ######################################## ### [100%]1: mysql-server #################################
Question: How many steps can an elephant be taken to the refrigerator?
Answer:: Open the refrigerator, put it in the elephant, and close the refrigerator.
The three-step strategy, haha, and secure configuration replication are also the same.
(I)
MySQL cold backup, also called offline backup
Is the simplest:
● Simple backup: you only need to copy the relevant files.
● Easy recovery: you only need to store the copied files in the same directory.
It is also the safest:
● The optimal method
RealWar environment Introduction:
Server Name
IP
System
MySQL
Odd.example.com
192.168.1.116
Rhel-5.8
5.5.16
Even.example.com
192.168.1.115
Rhel-5.8
5.5.16
Assume that the database to be
(I) actual environment
Server Name ·
IP
OS
MySQL
Odd.example.com
192.168.1.116
RHEL-5.8
5.5.16
Even.example.com
192.168.1.115
RHEL-5.8
5.5.16
(Ii) advantages and disadvantages of the
(I) authentication and authorization
Certification: Who am I?
Authorization: what I can do?
Authentication is actually a process of verifying creden, And the creden required for entering MySQL include host, username, and password.
There are two
(I) Error Log
① Parameters
Log_error: Specify the log location and name
② Function
(1) Error/alarm information
(2) optimization help
(Ii) Slow query log
① Parameters
Log_slow_queries: Specify the log location and name
Long_query_time: SQL
Although this article is intended to understand, but it can be understood a little. After all, Zhuge Kong Ming is
Only character-based values have the so-called Character Set Concept.
Some character sets may require more CPU, more memory and disk
(1) udev Basics
Udev can manage files stored in the/dev directory. Files are generated only after the device is connected, and are automatically deleted after the device is pulled out.
It also allows you to add rules to modify the default name and
In essence, a view is only an SQL statement, but MySQL does not store the SQL statement.
Instead, we save the view definition in the form of a file like a table, and use. frm to exist.
The SQL statement displayed with show create view is unfriendly.
(I) Insert large data volume
(1) Replace a single row with multi-row insert: insert into T values (),(),(),...
(2) load data infile... into table t
(3) Write a temporary table and insert... select
(4) cancel the index and constraints, and
1. Create an account dedicated to replication
First, the replication operation involves two important permissions, which are described here:The replication client privilege enables the use of show Master Status and show slave status.Replication
Documentation for mysqldump: http://dev.mysql.com/doc/refman/5.1/zh/client-side-scripts.html#mysqldump
MysqldumpIt is most commonly used to back up an entire database:
shell> mysqldump db_name >backup-file.sql
You can read the dump file back to the
1. Install and uninstall MySQL under centos5
(1) run the following command as the root user:
Yum install MySQL
Yum install mysql-Server
Yum install mysql-devel
Yum install mysql-Client
Chgrp-r MySQL/var/lib/MySQL
Chmod-r
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