mysql-events icon indicating copy to clipboard operation
mysql-events copied to clipboard

ER_SPECIFIC_ACCESS_DENIED_ERROR but does have all the privileges needed

Open marileen-jansen opened this issue 5 years ago • 8 comments

My user definitely has the REPLICATION CLIENT privilege (as well as REPLICATION SLAVE) but I still get the error below. I have even tried the script with the SUPER privilege. When I read the binlog with only using ZongJi I get no errors and can read the binlog.

code: 'ER_SPECIFIC_ACCESS_DENIED_ERROR',
  errno: 1227,
  sqlMessage:
   'Access denied; you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation',
  sqlState: '42000',
  index: 0,
  sql: 'SHOW BINARY LOGS'

marileen-jansen avatar Oct 03 '19 09:10 marileen-jansen

This is very strange, what MySQL version are you using?

rodrigogs avatar Oct 03 '19 17:10 rodrigogs

@rodrigogs got the same issue. Permission should be alright, I've granted REPLICATION status on the user and check ed the mysql-bin settings.

code: 'ER_SPECIFIC_ACCESS_DENIED_ERROR', errno: 1227, sqlMessage: 'Access denied; you need (at least one of) the REPLICATION SLAVE privilege(s) for this operation', sqlState: '42000' }

MySQL Server version: 5.7.27-0ubuntu0.18.04.1-log

just-nilux avatar Oct 06 '19 02:10 just-nilux

This is very strange, what MySQL version are you using?

@rodrigogs Hi, I'm using Version: 5.5.60-MariaDB on Linux (x86_64)

marileen-jansen avatar Oct 07 '19 07:10 marileen-jansen

Hi, i got the same issue.

code: 'ER_SPECIFIC_ACCESS_DENIED_ERROR', errno: 1227, sqlMessage: 'Access denied; you need (at least one of) the REPLICATION SLAVE privilege(s) for this operation', sqlState: '42000' }

Granted all privileges to the users

Variable_name Value  
innodb_version 5.6.42-84.2
protocol_version 10
slave_type_conversions  
version 10.1.38-MariaDB
version_comment Source distribution
version_compile_machine x86_64
version_compile_os osx10.10
version_malloc_library system
version_ssl_library OpenSSL 1.0.2q  20 Nov 2018
wsrep_patch_version wsrep_25.24

JesusMtx avatar Oct 31 '19 17:10 JesusMtx

I'm not sure how I can reproduce the error. The tests are passing with MySQL 5.5, 5.6, 5.7 and 8.0.

rodrigogs avatar Nov 04 '19 16:11 rodrigogs

I'm not sure how I can reproduce the error. The tests are passing with MySQL 5.5, 5.6, 5.7 and 8.0.

In my case, it was a port redirection problem and user permissions in MySQL.

Captura de Pantalla 2019-11-04 a la(s) 10 17 18

I had to create a new user (dev) with the server name equal to my local ip since I use a XAMPP VM (Virtual Machine). Apparently the same error is reproduced by having the same username with different server names (in my case the root user). Greetings and I apologize for my English

JesusMtx avatar Nov 04 '19 16:11 JesusMtx

I ran into the same issue. it works fine on another server(CentOS) with same node version(v8.12.0) connect to the same mysql database with version 5.6. but it gives the following error run on an ubuntu server.

[2019-11-20 11:30:52.932] [INFO] console - Waiting for database events... [2019-11-20 11:30:52.941] [INFO] console - ZongJi error { Error: ER_SPECIFIC_ACCESS_DENIED_ERROR: Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation at Query.Sequence._packetToError (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14) at Query.ErrorPacket (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/protocol/sequences/Query.js:77:18) at Protocol._parsePacket (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/protocol/Protocol.js:278:23) at Parser.write (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/protocol/Parser.js:76:12) at Protocol.write (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/protocol/Protocol.js:38:16) at Socket. (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/Connection.js:91:28) at Socket. (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/Connection.js:502:10) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at Socket.Readable.push (_stream_readable.js:208:10) at TCP.onread (net.js:601:20) -------------------- at Protocol._enqueue (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/protocol/Protocol.js:144:48) at Connection.query (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/Connection.js:200:25) at ZongJi._findBinlogEnd (/alidata/web/yry-bops/node_modules/@rodrigogs/zongji/index.js:169:23) at nextMethod (/alidata/web/yry-bops/node_modules/@rodrigogs/zongji/index.js:98:22) at /alidata/web/yry-bops/node_modules/@rodrigogs/zongji/index.js:102:9 at Query. (/alidata/web/yry-bops/node_modules/@rodrigogs/zongji/index.js:138:16) at Query. (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/Connection.js:502:10) at Query._callback (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/Connection.js:468:16) at Query.Sequence.end (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24) at Query.ErrorPacket (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/protocol/sequences/Query.js:90:8) at Protocol._parsePacket (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/protocol/Protocol.js:278:23) at Parser.write (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/protocol/Parser.js:76:12) at Protocol.write (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/protocol/Protocol.js:38:16) at Socket. (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/Connection.js:91:28) at Socket. (/alidata/web/yry-bops/node_modules/@rodrigogs/mysql-events/node_modules/mysql/lib/Connection.js:502:10) at emitOne (events.js:116:13) code: 'ER_SPECIFIC_ACCESS_DENIED_ERROR', errno: 1227, sqlMessage: 'Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation', sqlState: '42000', index: 0, sql: 'SHOW BINARY LOGS' }

kevindude avatar Nov 20 '19 07:11 kevindude

I think your connection config is wrong. You can try console.log(connection) to see its infomation. Same issue for me and I resolved it by checked connection config.

zero2603 avatar Jun 30 '20 03:06 zero2603