我的SQL连接问题连接已成功与服务器建立,但随后发生错误 [英] My SQL connection problem connection was successfully established with the server, but then error occured

查看:106
本文介绍了我的SQL连接问题连接已成功与服务器建立,但随后发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目是在Vb和Mysql中开发的。现在我收到错误连接已成功与服务器建立,但在登录过程中出现错误



我的Db连接代码是

My Project is developed in Vb and Mysql. Now i got an error"Connection was Successfully established with the server,but then error occured during the login process"

My Db Connection Code is

Public Sub OpenDatabase(ByVal pblnOpen As Boolean)
        If GCon.State = ConnectionState.Open Then GCon.Close()
        GCon.ConnectionString = String.Format("Server={0};user id={1};password={2};database={3};Pooling=false", GstrServerName, GstrDBUser, GstrDBPass, GstrDBName)
        If pblnOpen Then GCon.Open()
    End Sub





我尝试过:



我尝试了很多其他但是没有清除错误



What I have tried:

I tried many other but the error was not cleared

推荐答案

使用调试器检查你传递的名称和密码,然后尝试UID和连接字符串中的PWD而不是用户ID和密码。
Check the name and password you are passing using the debugger, and try "UID" and "PWD" instead of "user id" and "password" in your connection string.


这篇关于我的SQL连接问题连接已成功与服务器建立,但随后发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆