Open
Description
Hey! Thanks for all the great work on this package. I'm currently running into an error when I try to connect to database. I just installed MySQL, with a fresh new database named angel_orm_test
.
I'm connecting like this:
var settings = ConnectionSettings(db: 'angel_orm_test');
var connection = await MySqlConnection.connect(settings);
Which gives the following error:
Unhandled exception:
MySQL Client Error: Authentication plugin not supported: caching_sha2_password
#0 HandshakeHandler.processResponse (package:sqljocky5/auth/handshake_handler.dart:117:7)
#1 Comm._processReceived (package:sqljocky5/comm/comm.dart:58:43)
<asynchronous suspension>
#2 Comm.readPacket (package:sqljocky5/comm/comm.dart:52:7)
<asynchronous suspension>
#3 Comm.connect.<anonymous closure> (package:sqljocky5/comm/comm.dart:175:34)
#4 BufferedSocket._onData (package:sqljocky5/comm/buffered_socket.dart:85:11)
#5 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#6 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#7 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#8 _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#9 _StreamController._add (dart:async/stream_controller.dart:639:7)
#10 _StreamController.add (dart:async/stream_controller.dart:585:5)
#11 new _RawSocket.<anonymous closure> (dart:io/runtime/binsocket_patch.dart:1283:33)
#12 _NativeSocket.issueReadEvent.issue (dart:io/runtime/binsocket_patch.dart:826:14)
#13 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#14 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#15 _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#16 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)
I haven't used MySQL in years, so I'm not 100% sure what the cause might be.
Metadata
Metadata
Assignees
Labels
No labels
Activity
disburden commentedon Feb 15, 2019
Same question,should only appear in mysql8.0.
tejainece commentedon Feb 15, 2019
@thosakwe @disburden PRs are welcome!
tejainece commentedon Feb 15, 2019
FYI
https://stackoverflow.com/questions/50557234/authentication-plugin-caching-sha2-password-is-not-supported
tejainece commentedon Feb 19, 2019
Support for "caching_sha2_password" has landed: 8dbfe0d
I haven't tested it. I will do it soon. If you have time, please test it and let me know.
disburden commentedon Feb 22, 2019
It seem still doesn't to work
Error 1043 (08S01): Bad handshake
BasedMusa commentedon Dec 22, 2020
Still getting this.
I have installed MySQL 8.0 for Ubuntu x64 on my DigitalOcean cloud server.
Using Dart as a backend with Angel & SQLJocky5.
Dart Version
StackTrace
4stern commentedon Dec 22, 2020
my solution: moving to postgres-server and use
https://pub.dev/packages/postgres
BasedMusa commentedon Dec 27, 2020
My solution was to configure the MySQL server to use mysql_native_password as the default authentication plugin. I had to find my
my.cnf
file (Ubuntu 20) and add this at the bottom.Add this to my.cnf
Then I restarted the MySQL Server and then created a new user, so that it would be using mysql_native_password as it's authentication plugin.
After this my dart server was finally able to connect!
relf108 commentedon May 4, 2021
This worked a charm for me. Found my.cnf under /etc/mysql
iammohsinar commentedon Oct 2, 2021
This work for me Found homebrew(mysql) my.cnf under /usr/local/etc/