Closed MrDevDuck closed 11 months ago
Same issue here: The function "scramble_password" in MySQL_Packet.cpp includes the following calls:
Sha1.print(password); .... Sha1.write(pwd_buffer, 40);
Both "print" as well as "write" seem to never return (added debug statements).
I had upgraded my Arduino IDE to 2.2.1. The include for "Print.h" is resolves to from "~/.arduino15/packages/esp32/hardware/esp32/2.0.14/cores/esp32/Print.h"
Prior to upgrading my IDE and libraries (from a very old version) the SQL connection was working without issues.
Regards Bernhard
Guess I found the issue.
Arduino IDE installs the release version 1.2.0 of this repo, which does not include the bug fix for "missing return statements" in MySQL_Encrypt_Sha1.cpp
Using the version from master resolved the connection issue for me.
Guess I found the issue.
Arduino IDE installs the release version 1.2.0 of this repo, which does not include the bug fix for "missing return statements" in MySQL_Encrypt_Sha1.cpp
Using the version from master resolved the connection issue for me.
The problem has been solved. Thank you.
Arduino IDE Download the version where the return of the write function is missing. Keep that in mind.
hi
I am using the wESP32 board. An ESP32-related package was installed through the ArduinoIDE board manager, and the MySQL Connector library was also used.
But last week, the ESP32 board package was suddenly deleted. Other PCs had the same phenomenon. I never deleted it.
As a result, the ESP32-related package was installed again and logic was applied to the board, but it was not connected to the database.
When a board that had already been applied with logic is serially monitored, it is normally connected to the database. Problems arise when new logic is applied to the board.
So I implemented simple Database access logic.
Connect to WiFi
When the connection to the network is complete, attempt to connect to the Database.
When [connect()] is called, only "...trying..." is displayed.
I tracked the library.
Note 1. Database is fine. My PC is running MySQL server and can be accessed from another PC on the same network.
Note 2. I left port 3306 open through firewall settings.
Note 3. MySQL_Connection.cpp file connected= client->connect(server, port) returns SUCCESS, and read_packet() and parse_handshake_packet() appear to be operating normally. The network is determined to be normal.
Note 4. The DB account is normally accessed when tested with HeidiSql on another PC.
In summary, the conclusion is, Sha1.print (password); does not work.
What's the problem?