ChuckBell / MySQL_Connector_Arduino

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

error login arduino #13

Closed izzyneko closed 7 years ago

izzyneko commented 7 years ago

Aborted connection 71 to db: 'unconnected' user: 'robot1' host: '192.168.0.17' (Got an error reading communication packets)

192.168.0.17 Connecting... Connected to server version 5.7.17-log Disconnected.

ChuckBell commented 7 years ago

Sorry, but that isn't enough information to open a case. There are many things that can go wrong with connecting to the server. Please be sure to read the troubleshooting section in the reference manual too.

Please provide the version of the connector, the hardware you're using, version of the IDE, what other libraries are involved, etc. A sample of your sketch would also help.

Also, try removing all other code and/or create a simple sketch that just connects to the server and test that. Once that works, add things back in until the error reoccurs.

izzyneko commented 7 years ago

only remove conn.close(); sorry

void setup() { Serial.begin(115200); // wait for serial port to connect Ethernet.begin(mac_addr); Serial.println("Connecting..."); Serial.println(Ethernet.localIP()); if (conn.connect(server_addr, 3306, user, password)) { delay(10000); // You would add your code here to run a query once on startup. } else Serial.println("Connection failed."); conn.close();

// here the { }

}