SLV Install - TiDB
SLV Install - TiDB

Tại sao nên dùng TiDB (MySQL Cluster)?
TiDB cung cấp cơ sở dữ liệu HTAP cloud-native, có khả năng mở rộng ngang, sử dụng giao thức MySQL. Nhiều dịch vụ cơ sở dữ liệu quản lý tính phí theo từng lần đọc và ghi, nhanh chóng trở nên quá đắt cho các workload Solana yêu cầu độ trễ thấp. Với
slv install, bạn có thể dựng TiDB cluster phân tán của riêng mình, bỏ qua giới hạn rate của nhà cung cấp và giữ thông lượng cao mà không lo chi phí phát sinh bất ngờ.Điểm nổi bật
- TiDB: https://www.pingcap.com/tidb/
- Giao thức tương thích MySQL cùng với auto sharding, giúp bạn giữ nguyên client quen thuộc trong khi có hiệu suất scale-out.
- Đi kèm quản lý TiUP và TiDB Dashboard tích hợp sẵn, giúp bạn theo dõi tình trạng cluster ngay lập tức.
Chạy trình cài đặt
Chọn TiDB từ danh sách thành phần sau khi trỏ đến các host sẽ chạy cluster.
bash
$ slv install -i 1.1.1.1,
🚀 Installing software components...
? Select Software Component to Install (Redis)
Redis
❯ TiDB (MySQL Cluster)
Grafana
Prometheus
Node Exporter
Kafka Cluster$ slv install -i 1.1.1.1,
🚀 Installing software components...
? Select Software Component to Install (Redis)
Redis
❯ TiDB (MySQL Cluster)
Grafana
Prometheus
Node Exporter
Kafka ClusterLưu ý: Thay1.1.1.1bằng địa chỉ IP máy chủ của bạn.
Xem lại chi tiết
Trước khi Ansible bắt đầu,
slv hiển thị đường dẫn playbook và inventory để bạn có thể kiểm tra lại mục tiêu cluster. CLI cũng nhắc rằng TiDB có thể mất vài phút để cung cấp tùy thuộc vào phần cứng.bash
🚀 Installing software components...
? Select Software Component to Install (Redis) › TiDB (MySQL Cluster)
✅ You selected: TiDB (MySQL Cluster)
📋 Installation Details:
Software: TiDB (MySQL Cluster)
Inventory: 1.1.1.1,
Playbook: /Users/fumi/.slv/template/0.9.800/ansible/cmn/software/install-tidb.yml
⚠️ a few minutes to 10 minutes may be required for TiDB installation depending on your server performance.
? Do you want to proceed with the installation? (y/N) ›🚀 Installing software components...
? Select Software Component to Install (Redis) › TiDB (MySQL Cluster)
✅ You selected: TiDB (MySQL Cluster)
📋 Installation Details:
Software: TiDB (MySQL Cluster)
Inventory: 1.1.1.1,
Playbook: /Users/fumi/.slv/template/0.9.800/ansible/cmn/software/install-tidb.yml
⚠️ a few minutes to 10 minutes may be required for TiDB installation depending on your server performance.
? Do you want to proceed with the installation? (y/N) ›Theo dõi quá trình thực thi Ansible
Sau khi xác nhận,
slv chuyển quyền điều khiển cho Ansible để xây dựng các thành phần TiDB và dịch vụ hỗ trợ trên mỗi host.bash
🚀 Running ansible: ansible-playbook -i 1.1.1.1, -u solv /Users/fumi/.slv/template/0.9.800/ansible/cmn/software/install-tidb.yml
PLAY [Install and configure TiDB cluster] ************************************************************
TASK [Gathering Facts] *******************************************************************************🚀 Running ansible: ansible-playbook -i 1.1.1.1, -u solv /Users/fumi/.slv/template/0.9.800/ansible/cmn/software/install-tidb.yml
PLAY [Install and configure TiDB cluster] ************************************************************
TASK [Gathering Facts] *******************************************************************************Xác minh các endpoint
Khi quá trình cung cấp hoàn tất, CLI in ra thông tin kết nối để bạn có thể kết nối TiDB với ứng dụng ngay lập tức và xác nhận dashboard có thể truy cập được.
bash
✅ Installation completed successfully!
🌐 Access Information:
TiDB Endpoint: 1.1.1.1:4000 (MySQL Protocol)
Dashboard http://1.1.1.1:7301/dashboard/#/signin (HTTP Protocol)
🔑 Default credentials
Username: root
Password: <empty>✅ Installation completed successfully!
🌐 Access Information:
TiDB Endpoint: 1.1.1.1:4000 (MySQL Protocol)
Dashboard http://1.1.1.1:7301/dashboard/#/signin (HTTP Protocol)
🔑 Default credentials
Username: root
Password: <empty>Dashboard
Đăng nhập vào TiDB Dashboard tại
http://1.1.1.1:7301/dashboard/#/signin bằng thông tin đăng nhập mặc định ở trên. Từ đó bạn có thể giám sát tải cluster, kiểm tra câu lệnh SQL và xác minh tình trạng các thành phần.