onepub-dev / onepub-dev/simple_mysql_orm
MySQL Client Error: Authentication plugin not supported: caching_sha2_password
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 8
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
MySQL Client Error: Authentication plugin not supported: caching_sha2_password
simple_mysql_orm:
dependency: "direct main"
description:
name: simple_mysql_orm
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.2"
```
Future<ConnectionWrapper> _validConnection(
ConnectionWrapper? conn) async {
var _conn = conn;
var retries = 30;
var success = false;
String? lastError;
while (!success && retries > 0) {
try {
if (_conn != null && await _conn.wrapped.test()) {
success = true;
break;
} else {
if (_conn != null) {
_removeBadConnection(_conn);
_conn = null;
}
retries--;
_conn = await _createNew();
success = true;
break;
}
// ignore: avoid_catches_without_on_clauses
} catch (e) {
// remove the bad connection
_removeBadConnection(_conn);
_conn = null;
lastError = e.toString();
if (e is MySqlException) {
/// no point retrying if its access denied.
if (e.message.contains('Access denied for user')) {
break;
} else {
await _logAndWait(lastError);
}
}
if (e is StateError || e is MySqlException || e is SocketException) {
await _logAndWait(lastError);
} else {
rethrow; //////
}
}
}
if (!success) {
logger.severe('Unable to connect to db. $lastError');
throw MySqlORMException('Unable to connect to db. $lastError');
}
return _conn!;
Rethrow; ////// An exception is thrown when this line of code is executed
MySQL Client Error: Authentication plugin not supported: caching_sha2_password
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the _validConnection method shown in the issue, then trace _createNew and the wrapped.test call to locate the MySQL authentication setup. Reproduce the caching_sha2_password failure and verify that the resulting behavior or error handling matches the project's intended MySQL support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, mysql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100