Quick Start Guide for TiDB Database

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

Original topic: TiDB 数据库快速上手指南

| username: ShunWah

TiDB Quick Start Guide

Question:
In: Deploying a Local Test Cluster, at the end there is a: Note

TiUP Playground by default listens on 127.0.0.1, making the service accessible only locally; if you need the service to be accessible externally, you can use the --host parameter to specify the network interface to bind to an externally accessible IP.

By default, it only listens on 127.0.0.1, so you need to specify the IP using the --host parameter to access it externally.

As a beginner, I didn’t quite understand and always thought it could only be accessed via 127.0.0.1. I wanted to use an IP address but couldn’t initially find where to specify the --host parameter in the command.

I suggest adding an example below the note:
Note

TiUP Playground running the latest version of the TiDB cluster by default listens on 127.0.0.1, making the service accessible only locally; if you need the service to be accessible externally, you can use the --host parameter. For example: tiup playground --host 192.168.0.10 or tiup playground v7.5.0 --db 2 --pd 3 --kv 3 --host 192.168.0.10 to specify the network interface to bind to an externally accessible IP. (Here, 192.168.0.10 is an example IP; you can replace 192.168.0.10 with the actual IP address used in your network.)

As a beginner testing deployment for the first time, I didn’t quite understand, so any feedback is welcome.

| username: ShawnYan | Original post link

TiUP Playground listens on 127.0.0.1 by default,

equivalent to tiup playground --host 127.0.0.1
If started in a VM, it cannot be directly connected to TiDB from other nodes.

You can use --host

For example, if your VM IP is 192.168.0.10, you can start it this way: tiup playground --host 192.168.0.10
After TiDB starts, you can connect using mysql -h 192.168.0.10, or you can directly connect using a GUI tool.

| username: zhang_2023 | Original post link

Thank you for sharing.

| username: ShunWah | Original post link

:grin: Yes, it’s equivalent to tiup playground --host 127.0.0.1. The expert knows it without even looking. :+1: Thanks to Teacher Shaoan for sharing. As a newbie, I didn’t quite understand it at first and had to try multiple times to figure it out. Learned something new.

| username: zhanggame1 | Original post link

Is TiUP Playground different from single-machine deployment? For single-machine deployment, you can configure the cluster using 127.0.0.1, and it can be accessed from an external network.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.