question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Not supported" error

See original GitHub issue

Hi! I am trying to use this module in my application, but I receive an error “Not supported” whenever I try to connect. I shouldn’t have any options which would cause the issue, but am I doing something wrong? Also, if it has anything to say, I am using the docker image of mysql:latest for the db, and Deno 0.41.0

Here is my code:

import { Client, ClientConfig } from "https://deno.land/x/mysql/mod.ts";

const config: ClientConfig = {
	hostname: "localhost",
	port: 5001,
	username: "root",
	password: "pwd",
	db: "test",
	debug: true
}

const client = await new Client().connect(config);

console.log(await client.query("select 1 from nessie_migrations limit 1;"))

And here is the error:

$ deno run --allow-net --allow-read test.ts
Compile file:///Users/halvardssm/dev/mix/deno-nessie/test.ts
INFO connecting localhost:5001
error: Uncaught Error: Not supported
► auth.ts:43:13

43       throw new Error("Not supported");
               ^

    at auth (auth.ts:43:13)
    at buildAuth (auth.ts:42:24)
    at Connection._connect (connection.ts:53:18)
    at async Connection.connect (connection.ts:82:5)
    at async Client.createConnection (client.ts:45:5)
    at async DeferredStack.pop (deferred.ts:33:20)
    at async Client.useConnection (client.ts:109:24)
    at async Client.query (client.ts:89:12)
    at async test.ts:14:13

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
Telluscommented, Jun 30, 2020

If you want to use it now, you need to turn off authentication and use a blank password to access

A better way is to use the old version which is still present, you just need to use mysql_native_password. A simple query to update:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';

I didn’t have much luck with that approach, but changing the MySQL configuration itself worked just fine.

In the [mysqld] section of my MySQL configuration file I added

default_authentication_plugin=mysql_native_password

@manyuanrong, I think this solution might be slightly better than blank passwords, yes?

2reactions
KaKi87commented, Oct 26, 2020

Hello, any news on supporting caching_sha2_password ? Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

not supported error when I try and import local module ...
I have a local module (speech.js) in my create-react-app src folder that is the google text to speech code on their website. I...
Read more >
Fixing “This Plugin is Not Supported” error in Windows 10/11
1. Enable Flash in Chrome. 2. Install the latest Flash player; Update Flash:Clear the browsing data in Chrome. 3. Use another browser to...
Read more >
It says my system is not supported – what do I do?
If you are hitting an error that says some part of your system is not supported, view below for some tips on how...
Read more >
Resolve 'Your browser is not supported...' error - Apex ...
The following error appears when opening the TMCM/Apex Central™ WebUI in IE11: Your browser is not supported. upgrade to the latest version of...
Read more >
"Cannot play back the file. The format is not supported. ...
Cause · One or more Windows Media Player files are missing or damaged. · You are trying to play a media file that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found