-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SqlJocky to connect to MySQL in Dart: Error 1156 Got packets out of order #31
Comments
To the stackoverflow poster: Can you turn logging on using the following code, and add the results here (making sure your password is removed from the log first)?
|
When I add that code it gives several "undefined name" errors. Is there something I need to do to make it visible to main? |
I forgot to mention that you need the logging library in your pubspec and it needs to be imported:
|
Excellent, thanks. Here's the data, I didn't see the password in it, so I took out the IP just in case. 2013-12-05 12:12:11.991: ConnectionPool: Running query: select * from person |
Do the tests or the example in sqljocky work, or do they also have the same error? If they don't, can you show me the code that produces this error? |
I'm not sure how to run the tests in sqlJocky (Sorry I'm still pretty new to this) This is the entirety of the code I'm running at the moment import 'package:sqlJocky/sqlJocky.dart'; void main() { hierarchicalLoggingEnabled = true;
pool.query('select * from person').then((result) { for (var row in result) { } |
If you ran that code you'd get this error: "Uncaught Error: Class '_ResultsImpl' has no instance getter 'iterator'.", as result is a stream. This was a change in v0.8.0 a few weeks ago - do you have the latest version of sqljocky installed? Run 'pub upgrade sqljocky' to upgrade to it. You'd then need to change the code to this:
|
I've run pub upgrade many times, but even the original install I had should have been the newest version since I created this project just a couple days ago. I haven't gotten that error. I changed the code to what you stated anyway, but the output looks the same |
If you didn't get an error, I guess it wasn't getting that far. I'll keep investigating. |
Thanks for all your help James :) |
I haven't been able to reproduce this yet. Do you have old_password turned on in your mysql config file? |
I haven't found a way to check this remotely, I'll be meeting with the guy who is also the admin for this DB tomorrow I will ask him how to find this |
Unfortunately he wasn't in the office, so I wasn't able to ask him directly. However, I upgraded my Workbench and started getting a new error about authentication. Following this error led me to this thread http://bugs.mysql.com/bug.php?id=70023 And I am now 95% sure you are right and its the old password issue. I've sent an email to the DB admin asking him to make a couple changes, I'll confirm here afterwards if it works. It looks like the way the workbench fixed this was allowing an option for users to use the old authentication protocol. Maybe that is something that would be useful in sqlJocky as well? If you are just focusing on the newer versions that makes sense too, but its an idea. |
I've got the same error. In Buffer.readString I've got a this._list [80, 27, 45, 66, 248, 237, 99, 104, 111, 122, 237, 32, 112, 97, 99, 107, 101, 116, 121, 32, 118, 32, 99, 104, 121, 98, 110, 233, 109, 32, 112, 111, 248, 97, 100, 237]. It means P�-B��choz� packety v chybn�m po�ad�. I can read it as "Příchozí packety v chybném pořadí". I'm from Czech republic, I can translate it as "Got packets out of order". TheNetBird has database reto_zurich -> Zurich is in Germany, database sent localized message (same problem with me). Utf8decoder cannot read it correctly. No idea which encoding can mysql use to send error messages. |
Is there an option in SQLJocky that would allow me to work around mysql being configured this way? For our product reconfiguring mysql is not an option since it is already deployed worldwide. |
characterSet: CharacterSet.UTF8MB4, or collation: "utf8mb4_0900_ai_ci", when connecting to MySQL 8.0 |
There's a question about sqljocky on SO:
http://stackoverflow.com/questions/20358084/sqljocky-to-connect-to-mysql-in-dart-error-1156-got-packets-out-of-order
The text was updated successfully, but these errors were encountered: