Closed alexgalstyan closed 6 years ago
I am sorry, but I cannot help you solve the errors. Here's why:
The connector was designed specifically for use with the Oracle MySQL database system. It is neither guaranteed nor supported for use with other variants. It may work, but please understand that I am limited in what support I can provide to any issues encountered with non Oracle MySQL variants.
Why? There are differences in how the server works with the client protocol. Oracle MySQL is the only one that will work with the connector.
Those said, I can only suggest some things that may (or may not) help.
The Bad MOJO error occurs when the protocol finds an unexpected packet. Which is not surprising here as I've said the connector does not work with non Oracle MySQL variants this being the most common error encountered. The follow on message suggests the server was attempting to send more packets or there are packets that have not been read.
Consider opening and closing the connection for each query you want to run. This may help with the protocol gaffes.
Switch to using an Oracle MySQL release. I would suggest using MySQL 5.7.21 (or latest of the 5.7 releases).
OK, I have found how to solve this issue (for this condition). In one declaration of :
WiFiClient localclient; // Use this for WiFi instead of EthernetClient
MySQL_Connection localconn(&localclient);
impossible use two selection query (query that need fetch); For it need declare second object but it not good solve. for multi table selections use UNION operator.
INSERT, UPDATE and DELETE operation is working not stable, but it possible to solve with stored procedures. cursors execution very stable for many time calls with one opened object of cursor.
good luck. Thanks a lot for this library
If someone wanted to expand support, how should they go about it? I would like to see support for MariaDB for example.
Oh, and just for reference, multiple queries randomly results in the bad mojo issue, but with MariaDB, I found that 1 select followed by 1 insert, is stable for a given connection, at least for the 100 odd tests I have done.
I cannot reply to this request on this forum. Please PM me at d r c h a r l e s b e l l at g m a i l dot c o m.
On Tue, Jan 29, 2019 at 20:49 dachshund-digital notifications@github.com wrote:
Oh, and just for reference, multiple queries randomly results in the bad mojo issue, but with MariaDB, I found that 1 select followed by 1 insert, is stable for a given connection, at least for the 100 odd tests I have done.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ChuckBell/MySQL_Connector_Arduino/issues/58#issuecomment-458779622, or mute the thread https://github.com/notifications/unsubscribe-auth/AH0j4IbCCLjKyTi8459gxlVmqnzYYBk7ks5vIPojgaJpZM4VbTHn .
Hello dear chuckbell,
I think I have found new issues. I have not found about it something.
I am using ESP8266 with MySQL MariaDB (logged : Connected to server version 5.5.5-10.1.26-MariaDB-0+deb9u1) All SQL queries tried from direct terminal and worked properly
connection initialization sketch: