MySQL Migration to TiDB

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: MySQL迁移TiDB

| username: 小气鬼1105

Since I started working, MySQL has never left my side. With the rise of domestic databases, the distributed database TiDB, which is compatible with the MySQL ecosystem, has also found a place in my heart (since 2020). Gradually, the name TiDB has become more familiar. This article records why it is TiDB and not “ABC.”

Issues with MySQL Master-Slave Architecture

  • Poor cluster scalability

    • No read-write separation mechanism: current MySQL instance pressure is uneven
    • Single point of write: bottlenecks in writing can only be resolved by upgrading hardware
  • Inconsistent data in slave databases

    • MySQL master-slave synchronization can experience delays
  • Poor query capability for massive data

    • Currently using sharding and clustering, which has high maintenance costs
    • Large single table data volume, explosive data growth, slow queries
  • System availability

    • No automatic failover mechanism: manual switch needed when the master database fails
    • DDL operations lock tables, blocking business operations

How TiDB Solves These Issues

  • TiDB adopts a compute-storage separation architecture, allowing independent scaling of compute and storage
  • Raft protocol ensures strong data consistency
  • Introduces the columnar storage engine TiFlash combined with the row storage engine TiKV to build a true HTAP database
  • Uses multiple replicas + Multi-Raft protocol to ensure high system availability
  • Compatible with MySQL 5.7 protocol and MySQL ecosystem among other key features
  • Comprehensive ecosystem tools, including deployment, data migration, performance tuning, backup, and fault diagnosis
  • Resolves database architecture drawbacks and enhances performance
| username: Billmay表妹 | Original post link

Thanks for sharing~

| username: 小气鬼1105 | Original post link

Posted halfway, didn’t get it right the first time :grinning:

| username: zhanggame1 | Original post link

Post more when you have time.