我正在尝试通过 mysql 连接连接到本地数据库,以通过 Go 启动并运行数据库查询。
当尝试连接时,我遇到了以下错误:
this user requires clear text authentication. If you still want to use it, please add allowCleartextPasswords=1' to your DSN
我的数据库连接如下所示:db, err := sql.Open("sql", "<username>:<password>@tcp(127.0.0.1:<port>)/<dbname>?charset=utf8" )
我可以在哪里包含明文身份验证的依赖项?