We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
use employees
What would you like to be added:
Why is this needed:
Start arana, use this program connect to it error:
arana
package sql import ( "database/sql" "fmt" _ "github.com/go-sql-driver/mysql" "log" "testing" ) func TestName(t *testing.T) { mdb, err := sql.Open("mysql", "root:123456@tcp(127.0.0.1:13306)/employees?time_zone=%27Asia%2FShanghai%27&allowAllFiles=true") if err != nil { log.Fatalf("Open db err %v", err) } _, err1 := mdb.Exec("show tables") if err1 != nil { log.Fatalf("Exec show tables err %v", err1) } _, err2 := mdb.Exec(fmt.Sprintf("use `%s`", "employees")) if err2 != nil { log.Fatalf("Exec use db err %v", err2) } }
2023-01-11T10:31:47.077+0800 ERROR mysql/execute_handle.go:102 get dataset error 6: Unknown database 'employees' (errno 1049) (sqlstate 42000)
The text was updated successfully, but these errors were encountered:
原因:协议头为 ComQuery 类型,使用终端执行这条命令协议头为:ComInitDB。由于协议头为 ComQuery,导致请求直接被透传到 mysql 实例。 解决方案:待定
Sorry, something went wrong.
wang1309
Successfully merging a pull request may close this issue.
What would you like to be added:
Why is this needed:
Start
arana
, use this program connect to it error:The text was updated successfully, but these errors were encountered: