Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    [Frage] MySQL Database


    frockfuger
     Share

    Recommended Posts

    Heut wollt ich mal fragen, wie ich mich mit einer MySQL database connecte ( Z.B. die von Onlineseiten )

     

    Ich habe vor ein Programm zu erstellen, indem man sich einloggen muss, bovor man zum eigentlichem Programm kommt.

    Username + Userpassword sind irgendwo auf meiner Homepage in einer MySQL database drin ( wovon ich keine ahnung habe )

    Ich möchte dass ich mich mit den Accountdaten meiner Homepage in dem VB-Programm einloggen kann.

     

    Was ich bisher habe:

    Imports MySql.Data.MySqlClient
    Imports MySql.Data.MySqlClient.MySqlConnection
    Imports MySql.Data.MySqlClient.MySqlException
    Imports MySql.Data.MySqlClient.MySqlCommand
    
    Public Class Form1
       Inherits System.Windows.Forms.Form
    
    #Region " Windows Form Designer generated code "
    
       Public Sub New()
           MyBase.New()
    
           'This call is required by the Windows Form Designer. 
           InitializeComponent()
    
           'Add any initialization after the InitializeComponent() call 
    
       End Sub
    
       'Form overrides dispose to clean up the component list. 
       Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
           If disposing Then
               If Not (components Is Nothing) Then
                   components.Dispose()
               End If
           End If
           MyBase.Dispose(disposing)
       End Sub
    
       'Required by the Windows Form Designer 
    
       'NOTE: The following procedure is required by the Windows Form Designer 
       'It can be modified using the Windows Form Designer. 
       'Do not modify it using the code editor. 
       <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
           Me.Button1 = New System.Windows.Forms.Button
           Me.SuspendLayout()
           ' 
           'Button1 
           ' 
           Me.Button1.Location = New System.Drawing.Point(104, 200)
           Me.Button1.Name = "Button1"
           Me.Button1.TabIndex = 0
           Me.Button1.Text = "Button1"
           ' 
           'Form1 
           ' 
           Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
           Me.BackColor = System.Drawing.Color.White
           Me.ClientSize = New System.Drawing.Size(292, 273)
           Me.Controls.Add(Me.Button1)
           Me.Name = "Form1"
           Me.Text = "Form1"
           Me.ResumeLayout(False)
    
       End Sub
    
    #End Region
    
       Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
           Dim myConnectionString As String
    
           myConnectionString = "server=xyz;" _
           & "pwd=xyz;" _
           & "uid=???;" _
           & "database=xyz;"
    
           Try
               Dim conn As New MySql.Data.MySqlClient.MySqlConnection(myConnectionString)
               conn.Open()
               MessageBox.Show("Connection Opened Successfully")
           Catch ex As MySql.Data.MySqlClient.MySqlException
               Select Case ex.Number
                   Case 0
                       MessageBox.Show("Cannot connect to server. Contact administrator")
                   Case 1045
                       MessageBox.Show("Invalid username/password, please try again")
               End Select
           End Try
    
       End Sub

     

    Ich weiss nicht was eine UID sein soll, oder wozu sie gut ist, aber ich benötige sie. Bisher habe ich erfahren, dass es sich um einen loginnamen handelt (oder ähnliches).

     

     

     

    Debugerror:

    WindowsApplication2.vshost.exe Error: 0 : Access denied for user 'uid'@'server' (using password: YES)
    A first chance exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll

    • Upvote 1
    Link to comment
    Share on other sites

    sry aber irgendwas c&p und keine ahnung von haben ist nett gut

    außerdem warum willste auf mysql zugreifen wenn du davon auch keine ahnung hast ?

    Link to comment
    Share on other sites

    irgendwas c&p? das hab ich aus meinem VB programm (welches nicht funkt) kopiert.

     

     

     

    außerdem warum willste auf mysql zugreifen wenn du davon auch keine ahnung hast ?

     

    Wasn das für eine frage???... naja die antwort habe ich mal kenntlich gemacht (Nur für dich mein schatz) :

     

    Heut wollt ich mal fragen, wie ich mich mit einer MySQL database connecte ( Z.B. die von Onlineseiten )

     

    Ich habe vor ein Programm zu erstellen, indem man sich einloggen muss, bovor man zum eigentlichem Programm kommt.

    Username + Userpassword sind irgendwo auf meiner Homepage in einer MySQL database drin ( wovon ich keine ahnung habe )

    Ich möchte dass ich mich mit den Accountdaten meiner Homepage in dem VB-Programm einloggen kann.

     

    Was ich bisher habe:

    Imports MySql.Data.MySqlClient
    Imports MySql.Data.MySqlClient.MySqlConnection
    Imports MySql.Data.MySqlClient.MySqlException
    Imports MySql.Data.MySqlClient.MySqlCommand
    
    Public Class Form1
       Inherits System.Windows.Forms.Form
    
    #Region " Windows Form Designer generated code "
    
       Public Sub New()
           MyBase.New()
    
           'This call is required by the Windows Form Designer. 
           InitializeComponent()
    
           'Add any initialization after the InitializeComponent() call 
    
       End Sub
    
       'Form overrides dispose to clean up the component list. 
       Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
           If disposing Then
               If Not (components Is Nothing) Then
                   components.Dispose()
               End If
           End If
           MyBase.Dispose(disposing)
       End Sub
    
       'Required by the Windows Form Designer 
    
       'NOTE: The following procedure is required by the Windows Form Designer 
       'It can be modified using the Windows Form Designer. 
       'Do not modify it using the code editor. 
       <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
           Me.Button1 = New System.Windows.Forms.Button
           Me.SuspendLayout()
           ' 
           'Button1 
           ' 
           Me.Button1.Location = New System.Drawing.Point(104, 200)
           Me.Button1.Name = "Button1"
           Me.Button1.TabIndex = 0
           Me.Button1.Text = "Button1"
           ' 
           'Form1 
           ' 
           Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
           Me.BackColor = System.Drawing.Color.White
           Me.ClientSize = New System.Drawing.Size(292, 273)
           Me.Controls.Add(Me.Button1)
           Me.Name = "Form1"
           Me.Text = "Form1"
           Me.ResumeLayout(False)
    
       End Sub
    
    #End Region
    
       Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
           Dim myConnectionString As String
    
           myConnectionString = "server=xyz;" _
           & "pwd=xyz;" _
           & "uid=???;" _
           & "database=xyz;"
    
           Try
               Dim conn As New MySql.Data.MySqlClient.MySqlConnection(myConnectionString)
               conn.Open()
               MessageBox.Show("Connection Opened Successfully")
           Catch ex As MySql.Data.MySqlClient.MySqlException
               Select Case ex.Number
                   Case 0
                       MessageBox.Show("Cannot connect to server. Contact administrator")
                   Case 1045
                       MessageBox.Show("Invalid username/password, please try again")
               End Select
           End Try
    
       End Sub

     

     

    Ich weiss nicht was eine UID sein soll, oder wozu sie gut ist, aber ich benötige sie. Bisher habe ich erfahren, dass es sich um einen loginnamen handelt (oder ähnliches).

     

     

     

    Debugerror:

    WindowsApplication2.vshost.exe Error: 0 : Access denied for user 'uid'@'server' (using password: YES)
    A first chance exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll

    Edited by frockfuger
    Link to comment
    Share on other sites

    Username + Userpassword sind irgendwo auf meiner Homepage in einer MySQL database drin ( wovon ich keine ahnung habe )

    hmm also doch keine ahnung Biene Maja

    Link to comment
    Share on other sites

    und da ich das gesagt habe, hindert es dich daran mir zu helfen?

    Ich weiss was MYSQL ist. Ich kenne mein Mysql Pwd Username + IP usw...

    Ich weiss nicht wo in der MYSQL Database die User + Userpws von meiner DZCP-Homepage gespeichert werden, und ich weiss nicht ob ich dieses überhaupt für das Programmieren dieses Logincenters brauche.

     

    nochmal zu deiner frage:

    Ich will auf mysql zugreifen um mir ein Logincenter für mein Programm zu erstellen. ( Ob ich ahnung von Mysql habe oder nicht, interessiert eigentlich wenig )

    Ob ich dabei Copy & Paste, und iwas von eurem gecodetem in meinem Programm einfüge, interessiert auch keinen solange das Programm nachher funktioniert.

    Link to comment
    Share on other sites

    • 3 weeks later...

    Woher sollen wir wissen wo du in deiner Datenbank die Einträge speicherst die du brauchst? Und "UID" steht für UserID, das ist dein MySQL-Login. Zudem rate ich dir schwerst davon ab sowas in VB zu coden, da trotz Hilfsmitteln wie einem Obfuscator die Logindaten ausgelesen/abgefangen werden können wenn du es nicht ausgeklügelt programmiert hast.

    Link to comment
    Share on other sites

    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...