Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 golang 从非标准 MySQL“show”语句中检索数据集?例如,“显示表”、“显示变量”、“显示引擎 innodb 状态”。等等
我找不到任何信息来从 Golang 中的 mysql“show”语句中检索结果集。使用 database/sql 包或 sqlx 包都可以。
知道了!这是代码。有效!
var r1, r2, r3 string row := db.QueryRow("show engine innodb status") err = row.Scan(&r1, &r2, &r3)