title: How to Connect mysql using vb.net over lan connection
body: <p>I want to access mysql database which is from another computer. I had tried to search but couldn't find a solution that answers my question. Hope you can help me. </p>
  
  <p>Here is the error:</p>
  
  <blockquote>
    <p>Cannot connect to database: Authentication to host '127.0.0.1' for user 'root'
    using method 'mysql_native_password' failed with message: Unknown database.</p>
  </blockquote>
  
  <p>And here is the code.</p>
  
  <pre><code>    Private Sub CheckCon()
      mySqlConn = New MySqlConnection()
      mySqlConn.ConnectionString = "Server=127.0.0.1; port=3306; user id=root; password=thesis; database=dbjcasim;"
      Try
  
          mySqlConn.Open()
          MessageBox.Show("Connection to Database has been opened.")
          mySqlConn.Close()
      Catch myerror As MySqlException
          MessageBox.Show("Cannot connect to database: " &amp; myerror.Message)
      Finally
          mySqlConn.Dispose()
      End Try
  End Sub
  
  End Class
  </code></pre>