Skip to content

Commit 539f3ce

Browse files
authored
describe how to setup mysql via tiup (#37)
Co-authored-by: Rick <[email protected]>
1 parent 1d31f92 commit 539f3ce

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,35 @@ To use this extension in your API testing project, follow these steps:
1616
2. Configure the database connection settings.
1717
3. Integrate the extension into your API tests.
1818

19+
## Quick MySQL Setup with TiUP Playground
20+
21+
You can quickly set up a MySQL-compatible database using [TiUP Playground](https://docs.pingcap.com/tidb/stable/tiup-playground):
22+
23+
1. **Install TiUP** (if not already installed):
24+
25+
```sh
26+
curl --proto '=https' --tlsv1.2 -sSf https://tiup.io/install.sh | sh
27+
source ~/.profile
28+
```
29+
30+
2. **Start a TiDB (MySQL-compatible) cluster:**
31+
32+
```sh
33+
tiup playground
34+
```
35+
36+
This will launch a local TiDB cluster with default settings.
37+
38+
3. **Connect to TiDB using the MySQL client:**
39+
40+
```sh
41+
mysql -h 127.0.0.1 -P 4000 -u root
42+
```
43+
44+
Now you can create databases, tables, and run SQL queries as you would with MySQL.
45+
46+
For more details, see the [TiUP Playground documentation](https://docs.pingcap.com/tidb/stable/tiup-playground).
47+
1948
## Q&A
2049

2150
Run the command `apt-get install build-essential libsqlite3-dev` if you meet the sqlite errors.

0 commit comments

Comments
 (0)