-1

I'm doing a report with a report viewer form.

And returns me a error when i try to open the connection.

Here's the error:

 MySql.Data.MySqlClient.MySqlException occurred

  HResult=0x80004005
  Message=Authentication to host '' for user '' using method 'mysql_native_password' failed with message: Access denied for user ''@'fe80::289c:18c7:6714:8608%2' (using password: NO)

Inner Exception 1:
MySqlException: Access denied for user ''@'fe80::289c:18c7:6714:8608%2' (using password: NO)

All the other connections goes well but this one.

Error on code:

myAdapter.SelectCommand = New MySqlCommand("SELECT * FROM Stock", conn)

myAdapter.Fill(dbDataSet.Tables(0))

Connection:

Dim conn As New MySqlConnection
        conn = New MySqlConnection()
        conn.ConnectionString = "server=localhost;user id=root;password=;database=Empresa;"

Can someone tell me what i'm doing wrong?

Already tried this one (Host xxxx is not allowed to connect to this MySQL server) but now the error changes to this.

Apreciate your help, thanks.

Mario Rui
  • 1
  • 2

1 Answers1

0

You security is not quite right. Mysql allows / defaults to bind a user to an address. See the below:

https://serverfault.com/q/257513/219898

https://stackoverflow.com/a/3552946/1662973

If it is local ONLY, you can also consider turning off IPV6 - I see that it is binding to that.

Anthony Horne
  • 2,522
  • 2
  • 29
  • 51