Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug TiDB Documentation: 使用 mysql.js 连接到 TiDB #16061

Closed
Tracked by #15772
qiancai opened this issue Jan 9, 2024 · 4 comments · Fixed by #16091
Closed
Tracked by #15772

Debug TiDB Documentation: 使用 mysql.js 连接到 TiDB #16061

qiancai opened this issue Jan 9, 2024 · 4 comments · Fixed by #16091
Assignees
Labels
2024-tidb-docs-dash This issue or PR is included in the 2024 TiDB Docs Dash event.

Comments

@qiancai
Copy link
Collaborator

qiancai commented Jan 9, 2024

此 issue 为 Debug TiDB Documentation: TiDB 中文文档测试说明・Issue #15772・pingcap/docs-cn 的 sub-issue,目的是为了测试和验证使用 mysql.js 连接到 TiDB 文档。

请参考 #15772 中的说明测试该文档。

  1. 在完成文档验证后,将您的验证结果以评论的形式添加到当前 issue 上。验证结果可以是您遇到的问题、发现的错误或其他任何发现。如果验证顺利通过,您也可以添加评论说明。
  2. 对于在验证过程中发现的任何问题或错误,欢迎创建 Pull Request(PR)直接修正文档。创建 PR 时,请在 PR 描述中指明该 PR 解决了哪个 issue (例如,Fix #16061)。关于如何创建 PR 的详情,请参考TiDB 中文文档贡献指南

非常感谢您对测试和验证文档的贡献!

@qiancai qiancai added the 2024-tidb-docs-dash This issue or PR is included in the 2024 TiDB Docs Dash event. label Jan 9, 2024
@hey-hoho
Copy link
Contributor

/assign

@hey-hoho
Copy link
Contributor

结果验证通过,符合预期。

E:\heao\git\tidb-example\tidb-nodejs-mysqljs-quickstart>node --version 
v16.13.1

E:\heao\git\tidb-example\tidb-nodejs-mysqljs-quickstart>npm run start

> tidb-nodejs-mysqljs-quickstart@1.0.0 start
> node src/index.js

🔌 Connected to TiDB cluster! (TiDB version: 5.7.25-TiDB-v7.1.0)
⏳  Loading sample game data...
✅  Loaded sample game data.

🆕 Created a new player with ID 12.
ℹ️ Got Player 12: Player { id: 12, coins: 100, goods: 100 }
🔢 Added 50 coins and 50 goods to player 12, updated 1 row.
🚮 Deleted 1 player data.

@hey-hoho
Copy link
Contributor

文档中有需要修正的地方:

1、env配置文件中,文档中用的TIDB_HOST={host},参考其他语言的示例程序为保持统一,建议改为TIDB_HOST='{host}'

以上内容已同步提PR修改。
#16091
tidb-samples/tidb-nodejs-mysqljs-quickstart#2

@qiancai
Copy link
Collaborator Author

qiancai commented Jan 31, 2024

@hey-hoho 非常感谢您对使用 mysql.js 连接到 TiDB 文档的测试❤️。因为测试后创建的文档修改 PR #16091 已合并,此 issue 已自动关闭。如果后续您再遇到任何文档问题,欢迎在此文档仓库提 issue 或者 PR 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2024-tidb-docs-dash This issue or PR is included in the 2024 TiDB Docs Dash event.
Development

Successfully merging a pull request may close this issue.

2 participants