数据库连接错误 mysqld_stmt_execute


#1

请先搜索确保没有重复发帖。

Gogs 版本: 0.11.44.0409
系统类型及版本 linux 64
数据库:mysql 5.7
问题描述:刚开始是好的,可以注册个用户,过了一晚上就不能注册了。只要是涉及到修改或新增数据,都会报错。

[Macaron] 2018-04-13 09:16:00: Started GET /img/favicon.png for 59.61.92.14
[Macaron] [Static] Serving /img/favicon.png
[Macaron] 2018-04-13 09:16:00: Completed GET /img/favicon.png 200 OK in 223.312?s
[Macaron] 2018-04-13 09:16:09: Started GET /user/settings for 59.61.92.14
[Macaron] 2018-04-13 09:16:09: Completed GET /user/settings 200 OK in 8.4621ms
2018/04/13 09:16:09 [TRACE] Session ID: d7ecf1059f811872
2018/04/13 09:16:09 [TRACE] CSRF Token: DWRA4lWH404Vifxt1F2IQ20SqaE6MTUyMzU4MjE1NjczMjI2ODkxMw==
2018/04/13 09:16:09 [TRACE] Template: user/settings/profile
[Macaron] 2018-04-13 09:16:09: Started GET /img/favicon.png for 59.61.92.14
[Macaron] [Static] Serving /img/favicon.png
[Macaron] 2018-04-13 09:16:09: Completed GET /img/favicon.png 200 OK in 213.567?s
[Macaron] 2018-04-13 09:16:11: Started POST /user/settings for 59.61.92.14
2018/04/13 09:16:11 [TRACE] Session ID: d7ecf1059f811872
2018/04/13 09:16:11 [TRACE] CSRF Token: DWRA4lWH404Vifxt1F2IQ20SqaE6MTUyMzU4MjE1NjczMjI2ODkxMw==
[Macaron] 2018-04-13 09:16:11: Completed POST /user/settings 500 Internal Server Error in 16.352206ms
2018/04/13 09:16:11 [ERROR] […g/context/context.go:171 ServerError()] UpdateUser: Error 1210: Incorrect arguments to mysqld_stmt_execute
2018/04/13 09:16:11 [TRACE] Template: status/500
[Macaron] 2018-04-13 09:16:11: Started GET /img/favicon.png for 59.61.92.14
[Macaron] [Static] Serving /img/favicon.png
[Macaron] 2018-04-13 09:16:11: Completed GET /img/favicon.png 200 OK in 190.446?s
2018/04/13 09:16:37 [TRACE] Doing: MirrorUpdate
[Macaron] 2018-04-13 09:17:09: Started GET /user/settings for 61.151.225.155
[Macaron] 2018-04-13 09:17:09: Completed GET /user/settings 302 Found in 574.557?s
2018/04/13 09:17:09 [TRACE] Session ID: 7681927e91114403
2018/04/13 09:17:09 [TRACE] CSRF Token: 3QVrtEAl7dnlF3q10w5JxRvKp8c6MTUyMzU4MjIyOTQ0MDk2MzI3Mg==
[Macaron] 2018-04-13 09:17:09: Started GET /user/login for 61.151.225.155
[Macaron] 2018-04-13 09:17:09: Completed GET /user/login 200 OK in 1.672219ms
2018/04/13 09:17:09 [TRACE] Session ID: 7681927e91114403
2018/04/13 09:17:09 [TRACE] CSRF Token: 3QVrtEAl7dnlF3q10w5JxRvKp8c6MTUyMzU4MjIyOTQ0MDk2MzI3Mg==
2018/04/13 09:17:09 [TRACE] Template: user/auth/login
[Macaron] 2018-04-13 09:17:12: Started GET /js/jquery-1.11.3.min.js for 61.151.225.155
[Macaron] [Static] Serving /js/jquery-1.11.3.min.js
[Macaron] 2018-04-13 09:17:12: Completed GET /js/jquery-1.11.3.min.js 200 OK in 245.277?s

页面上是500,下面写着
An error has occurred : Error 1210: Incorrect arguments to mysqld_stmt_execute
Application Version: 0.11.44.0409


#2

看下这个?https://github.com/go-sql-driver/mysql/issues/730#issuecomment-356059588