Can't use mysqlimport since MySQL 8 upgrade due to insufficient privileges

0

Since upgrading my RDS instance to MySQL 8 I am no longer able to use mysqlimport to import external data from .csv files. When running mysqlimport it returns the following error:

mysqlimport: Error: 1227 Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation

It is, however, impossible to assign any of these privileges. The RDS User Guide instructions for mysqlimport provide instructions for setting the SESSION_VARIABLES_ADMIN privilege for MySQL version 8.0.15 and higher by running the

GRANT SESSION_VARIABLES_ADMIN ON *.* TO *user*;

command, but this results in the following error:

ERROR 1227 (42000): Access denied; you need (at least one of) the GRANT OPTION privilege(s) for this operation ... and RDS does not support the GRANT OPTION privilege.

Jared
質問済み 3ヶ月前263ビュー
1回答
0

Hello.

Please use the following command to set the privilege "ROLE_ADMIN" to the database administrative user (such as the root user), and then try setting "SESSION_VARIABLES_ADMIN".

GRANT ROLE_ADMIN on *.* to root
profile picture
エキスパート
回答済み 3ヶ月前
  • While this ROLE_ADMIN command succeeds when running it under the admin user, subsequently trying to set the SESSION_VARIABLES_ADMIN privilege results in the same error as above: "ERROR 1227 (42000): Access denied; you need (at least one of) the GRANT OPTION privilege(s) for this operation".

  • By the way, is the database user used by "mysqlimport" the correct database administrator user (root user, etc.)?

  • Yes, I've tried running these commands with both the admin user and a separate user both of which I've tried assigning the appropriate privileges without success. I even reset the admin user password in the RDS console - which resets its privileges to the default.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ