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.

ER_NOT_SUPPORTED_AUTH_MODE unix_socket

See original GitHub issue

Hello,

I cannot use socket_auth to identify via this library on my ARM device. I read several issues about this problem, without quite understanding wether this is a new feature or a bug and whether it is already implemened. The most current issue seem to be #2001 which indicates this is a new feature request.

However using socket_auth works fine on my desktop, but not on my arm board, despite running the same MariaDB Version 5.5.5-10.1.38-MariaDB. So I can only assume that my MariaDB behaves differently or the mysql.js lib behaves differently on the arm board. The mariadb on arm is self build and has non standard build options. However the native mysql utility still works with socket_auth.

So my main question probably is: What is the current status of this? It seems to be assumed that socket_auth is not yet implemented. However this cannot be since it works on my desktop.

And maybe someone even has more “specific” help for me? See below for more informations.

So the server sends its initial Handshake:

<-- HandshakeInitializationPacket {
  protocolVersion: 10,
  serverVersion: '5.5.5-10.1.38-MariaDB',
  threadId: 955,
  scrambleBuff1: <Buffer 58 36 46 3b 36 3d 6c 2d>,
  filler1: <Buffer 00>,
  serverCapabilities1: 63487,
  serverLanguage: 33,
  serverStatus: 2,
  serverCapabilities2: 41023,
  scrambleLength: 21,
  filler2: <Buffer 00 00 00 00 00 00 00 00 00 00>,
  scrambleBuff2: <Buffer 38 72 57 3b 62 59 7a 78 6a 2f 45 50>,
  filler3: <Buffer 00>,
  pluginData: 'mysql_native_password',
  protocol41: true }

The mysql.js client replies with

00  2c 00 00 01 cf f3 06 00  00 00 00 00 21 00 00 00  |,...........!...|
10  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
20  00 00 00 00 72 6f 6f 74  00 00 77 75 74 64 62 00  |....root..wutdb.|

--> (990) ClientAuthenticationPacket {
  clientFlags: 455631,
  maxPacketSize: 0,
  charsetNumber: 33,
  filler: undefined,
  user: 'root',
  scrambleBuff: <Buffer >,
  database: 'wutdb',
  protocol41: true }

mysql.js options:

{
  user: 'root',
  socketPath: '/tmp/mysqld.sock',
  database: 'wutdb',
  debug: true
}

The answer of the native mysqlclient is a bit longer:

00  a0 00 00 01 85 a6 3f 20  00 00 00 01 21 00 00 00  |......? ....!...|
10  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
20  00 00 00 00 72 6f 6f 74  00 00 6d 79 73 71 6c 5f  |....root..mysql_|
30  6e 61 74 69 76 65 5f 70  61 73 73 77 6f 72 64 00  |native_password.|
40  63 03 5f 6f 73 05 4c 69  6e 75 78 0c 5f 63 6c 69  |c._os.Linux._cli|
50  65 6e 74 5f 6e 61 6d 65  08 6c 69 62 6d 79 73 71  |ent_name.libmysq|
60  6c 04 5f 70 69 64 04 31  35 38 37 0f 5f 63 6c 69  |l._pid.1587._cli|
70  65 6e 74 5f 76 65 72 73  69 6f 6e 07 31 30 2e 31  |ent_version.10.1|
80  2e 33 38 09 5f 70 6c 61  74 66 6f 72 6d 03 61 72  |.38._platform.ar|
90  6d 0c 70 72 6f 67 72 61  6d 5f 6e 61 6d 65 05 6d  |m.program_name.m|
a0  79 73 71 6c                                       |ysql|
a4

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
LA12commented, Sep 5, 2019

Hi @dougwilson you probably wanted to mention @lal12 . Good luck with the issue 😃

0reactions
lal12commented, Sep 6, 2019

I know this is a segway, but any reason why you are not using the MariaDB client to connect to your MariaDb server? https://www.npmjs.com/package/mariadb

I actually wasn’t aware there is one and had a good experience with (the api of) mysql and mysql2, so not a reason to explicitly look for it.

As far as I am aware the code regarding this situation is originally from mysql, I still think this problem could occur on MySQL to, unless they had big changes there. But I will take a look at the mariadb module for my project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ER_NOT_SUPPORTED_AUTH_...
Here is the Failed Connection Error Message that I received: "ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol ...
Read more >
ER_NOT_SUPPORTED_AUTH_...
Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client.
Read more >
Authentication Plugin - Unix Socket - MariaDB Knowledge Base
The unix_socket authentication plugin allows the user to use operating system credentials when connecting to MariaDB via the local Unix socket file.
Read more >
ER_NOT_SUPPORTED_AUTH_...
How to solve node js Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; ...
Read more >
B.3.2.4 Client does not support authentication protocol
The current implementation of the authentication protocol uses a password hashing algorithm that is incompatible with that used by older (pre-4.1) clients.
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