MySQL database horizontal-sharding method, and MySQL connection establishment method and device

A technology of horizontal segmentation and connection establishment, applied in the field of MYSQL data storage, it can solve the problems of inability to re-segment the MYSQL database, large business impact, difficult data migration, etc., and achieve flexible segmentation and migration, good scalability and disaster prevention. sexual effect

CN103324732AInactive Publication Date: 2013-09-25UCWEB
4 Cites 3 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2013-09-25
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention provides a MySQL database horizontal-sharding method. The method includes: distributing a data ID range (Min(n), Max(n)) for a database in a database cluster according to a preset data ID range distribution strategy; and storing MySQL data to each database with the data ID range including data IDs according to the data IDS of the MySQL data. The letter N is a total of the databases in the database cluster, the Min(n) is a minimum boundary value of the data ID range of the n-th database, and the Max(n) is a maximum boundary value of the data ID range of the n-th database. Through the method, the MySQL databases can be sharded and transferred flexibly and extensibility is improved.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the field of MYSQL data storage, and more specifically, to a MYSQL database horizontal switching method, a MYSQL connection establishment method and a device.

[0002] Background technique

[0003] As the data stored in MYSQL becomes larger and larger, one MYSQL database cannot store all the data, so the data will inevitably be stored in several MYSQL databases, which requires database sharding.

[0004] Database segmentation methods mainly include two types: vertical segmentation and horizontal segmentation. Straight splitting refers to splitting different columns in the database and storing them in different MYSQL databases. Horizontal splitting refers to splitting different rows in the database and storing them in different databases. Since vertical splitting does not have good scalability, horizontal splitting is usually used when splitting MYSQL databases.

[0005] At present, the representative open source horizontal ...

Examples

Embodiment Construction

[0041] Various aspects of the disclosure are described below. It should be appreciated that the teachings herein may be embodied in a wide variety of forms and that any specific structure, function, or both disclosed herein are merely representative. Based on the teachings herein one skilled in the art should appreciate that an aspect disclosed herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented or a method practiced using any number of the aspects set forth herein. In addition, such an apparatus may be implemented or such a method may be practiced with other structure, functionality, or structure and functionality in addition to or in addition to one or more of the aspects set forth herein. Additionally, any aspect described herein may comprise at least one element of a claim.

[0042] Various embodiments of the present invention will be described bel...