MySQL报错113_测试mysql时发生了错误

$ go test -v

[mysql] 2018/06/21 15:13:14 auth.go:293: unknown auth plugin:

[mysql] 2018/06/21 15:13:14 driver.go:113: could not use requested auth plugin '': this authentication plugin is not supported

[mysql] 2018/06/21 15:13:15 auth.go:293: unknown auth plugin:

[mysql] 2018/06/21 15:13:15 driver.go:113: could not use requested auth plugin '': this authentication plugin is not supported

[mysql] 2018/06/21 15:13:16 auth.go:293: unknown auth plugin:

[mysql] 2018/06/21 15:13:16 driver.go:113: could not use requested auth plugin '': this authentication plugin is not supported

[mysql] 2018/06/21 15:13:17 auth.go:293: unknown auth plugin:

[mysql] 2018/06/21 15:13:17 driver.go:113: could not use requested auth plugin '': this authentication plugin is not supported

=== RUN   TestUserWorkFlow

=== RUN   TestUserWorkFlow/Add

[mysql] 2018/06/21 15:13:18 auth.go:293: unknown auth plugin:

[mysql] 2018/06/21 15:13:18 driver.go:113: could not use requested auth plugin '': this authentication plugin is not supported

=== RUN   TestUserWorkFlow/Get

[mysql] 2018/06/21 15:13:19 auth.go:293: unknown auth plugin:

[mysql] 2018/06/21 15:13:19 driver.go:113: could not use requested auth plugin '': this authentication plugin is not supported

2018/06/21 15:13:19 Error 1045: Access denied for user 'root'@'localhost' (using password: YES)

=== RUN   TestUserWorkFlow/Del

[mysql] 2018/06/21 15:13:20 auth.go:293: unknown auth plugin:

[mysql] 2018/06/21 15:13:20 driver.go:113: could not use requested auth plugin '': this authentication plugin is not supported

2018/06/21 15:13:20 Delete user error: Error 1045: Access denied for user 'root'@'localhost' (using password: YES)

panic: runtime error: invalid memory address or nil pointer dereference [recovered]

panic: runtime error: invalid memory address or nil pointer dereference

[signal 0xc0000005 code=0x0 addr=0x0 pc=0x59da81]

goroutine 72 [running]:

testing.tRunner.func1(0xc0421222d0)

F:/Go/src/testing/testing.go:742 +0x2a4

panic(0x62cc00, 0x794e80)

F:/Go/src/runtime/panic.go:505 +0x237

database/sql.(*Stmt).ExecContext(0x0, 0x69d1c0, 0xc04205a0e8, 0xc04203bf28, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0)

F:/Go/src/database/sql/sql.go:2224 +0x51

database/sql.(*Stmt).Exec(0x0, 0xc04203bf28, 0x2, 0x2, 0x1, 0xc0420cc260, 0xf, 0x77dc3f)

F:/Go/src/database/sql/sql.go:2253 +0x6c

video_server/api/dbops.DeleteUser(0x67053f, 0x7, 0x66fbad, 0x3, 0x489d6d, 0x5b2b500f)

F:/GoProjects/src/video_server/api/dbops/api.go:35 +0x194

video_server/api/dbops.testDeleteUser(0xc0421222d0)

F:/GoProjects/src/video_server/api/dbops/api_test.go:44 +0x56

testing.tRunner(0xc0421222d0, 0x680848)

F:/Go/src/testing/testing.go:777 +0xd7

created by testing.(*T).Run

F:/Go/src/testing/testing.go:824 +0x2e7

exit status 2

FAIL    video_server/api/dbops  7.672s

mysql连接时报错,不过我试过用命令行连接mysql是可以的,也能运行select语句,不知道为什么用go test跑的时候出了这个问题~~?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值