Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
1、

invalid semicolon separator in query

原因:默认表单请求中带问题原因:默认表单请求中带;字符是非法的(需要urlencode)。

错误示例:错误示例

Code Block
languagexmlbash
curl localhost:8000/Execute -d '{
	"Component": "mysql",
	"ResourceId": "cdb-gy6hm0ee",
	"Port": 6379,
	"SQL": "show databases;",
	"UserName": "root",
	"Password": ""
}'

修复示例

提交请求的时候需要注明ContentType,例如这里应当标明是JSON请求。修复示例:

Code Block
languagexmlbash
curl -X POST -H "Content-Type: application/json" localhost:8000/Execute -d '{
	"Component": "mysql",
	"ResourceId": "cdb-gy6hm0ee",
	"Port": 6379,
	"SQL": "show databases;",
	"UserName": "root",
	"Password": ""
}'





Panel
titleContent Menu

Table of Contents