[HELP][MySQL][VB6]Access Denied?[VB6][MySQL][HELP]

Status
Not open for further replies.
Joined
May 2, 2007
Messages
574
Reaction score
3
I May Be A Habbotard But I Do Other Stuff Aswell So Dont Call Me A HABBOTARD!

Anyway
Im Making A Habbo Server Using VB6 And Im Gonna Connect MySQL To My Server.

But Whenever I Run My Server To Test The Connection I Get This Error


What Can I Say - [HELP][MySQL][VB6]Access Denied?[VB6][MySQL][HELP] - RaGEZONE Forums



Any Ideas How To Fix?

My Code I Use Is Below

Code:
Private Sub cmdCreate_Click()
Dim con1 As New adodb.Connection
con1.CursorLocation = adUseClient
con1.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" & txtSQLUser.Text & ";DATABASE=" & txtdbName.Text & ";USER=" & txtdbHost.Text & ";PASSWORD=" & txtSQLPass.Text & ";;;"
con1.Open
If con1.State = Connected Then
MsgBox "Successful Connection!"
End If
End Sub
 
Looks like a username error.

Check it's root or whatever you use.

Also, Good Luck with the server.

Cya,
Daney
 
Ummm.....
My Username Is Root.
I Think It Is My Text Boxes
Cause If I Put My Info In And Take Out The Stuff Like txtSQLPort.Text
It Works :S

P.S Daney, Dont Tell People About The Server ;)
 
Wrong host, username or password?

Have you actually read the error?
 
He needs to add (before the username value) "UID="
Your string is screwed up.
Why does it use the host as the user?
Also, don't you need to use PWD instead of PASSWORD?
And maybe an option? And port =D

Code:
constr = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=" & Host.Text & ";UID=" & Username.Text & ";PWD=" & Pass.Text & ";DATABASE=" & DB.Text & ";PORT=" & Port.Text & ";OPTION=3"
 
He needs to add (before the username value) "UID="
Your string is screwed up.
Why does it use the host as the user?
Also, don't you need to use PWD instead of PASSWORD?
And maybe an option? And port =D

Code:
constr = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=" & Host.Text & ";UID=" & Username.Text & ";PWD=" & Pass.Text & ";DATABASE=" & DB.Text & ";PORT=" & Port.Text & ";OPTION=3"


OMG It Worked :eek6::eek6:

Thanks Alot Cask!
 
Status
Not open for further replies.
Back