ChuckBell / MySQL_Connector_Arduino

Database connector library for using MySQL with your Arduino projects.
332 stars 133 forks source link

Issue connection to MariaDB wit ESP8266 #183

Closed hasenradball closed 2 years ago

hasenradball commented 2 years ago

Hello,

I triy to connect to a MariaDB database via an ESP8266. I always get the following error:

 WLAN established!
...trying...
Error: 83 = Access denied for user 'root'@'ESP-011A83.fritz.box' (using password: YES).
 DB Connection failed!

I use the MySQL_Connector_Arduino and cheked the user has the access for it.

Is there an hint what the issue could be?

That's the code I use...

// Wifi Client for Connection to IP
      WiFiClient client;
      MySQL_Connection conn((Client *) &client);

      Wifi wlan{SSID, PASSWORD};
      if (wlan.Wifi_Connect()) {
        DBG__PRINT("WLAN established!");
        if (conn.connect(IPAddress(192,168,178,12), DB_PORT, DB_USER, DB_PASSWORD)){
          DBG__PRINT("DB Connected!");
        }
        else {
          DBG__PRINT("DB Connection failed!");
        }
      }
ChuckBell commented 2 years ago

I’m sorry, but non-Oracle variants of MySQL are not supported. There are some differences that can make the connector incompatible.

That said, some have had success. I would suggest going through the troubleshooting section on the wiki.

On Sun, Nov 21, 2021 at 16:36 Hasenradball @.***> wrote:

Hello,

I triy to connect to a MariaDB database via an ESP8266. I always get the following error:

WLAN established! ...trying... Error: 83 = Access denied for user 'root'@'ESP-011A83.fritz.box' (using password: YES). DB Connection failed!

I use the MySQL_Connector_Arduino and cheked the user has the access for it.

Is there an hint what the issue could be?

That's the code I use...

// Wifi Client for Connection to IP WiFiClient client; MySQL_Connection conn((Client *) &client);

  Wifi wlan{SSID, PASSWORD};
  if (wlan.Wifi_Connect()) {
    DBG__PRINT("WLAN established!");
    if (conn.connect(IPAddress(192,168,178,12), DB_PORT, DB_USER, DB_PASSWORD)){
      DBG__PRINT("DB Connected!");
    }
    else {
      DBG__PRINT("DB Connection failed!");
    }
  }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ChuckBell/MySQL_Connector_Arduino/issues/183, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6SHYFM2AQCPK526764H4LUNFQ4LANCNFSM5IPTGYLQ .

ChuckBell commented 2 years ago

Also, please check the other issues for ESP specific issues. There is a known issue with the latest ESP library, which may or may not be relevant.