Why can't make dumps of MySQL DB even though I have ALL privileges?

oskarfightingthecode

Just wondering, why I can't make dumps of database even though I have ALL PRIVILEGES granted.

+----------------------------------------------------------+
| Grants for me@%                                          |
+----------------------------------------------------------+
| GRANT USAGE ON *.* TO `me`@`%`                           |
| GRANT ALL PRIVILEGES ON `me`.* TO `me`@`%`               |
+----------------------------------------------------------+
2 rows in set (0.01 sec)

When trying

mysqldump --single-transaction --skip-add-locks --routines --triggers --column-statistics=FALSE --set-gtid-purged=OFF --user=$MYSQL_USER --password=$MYSQL_PASS --host=$MYSQL_HOST --port=$MYSQL_PORT $MYSQL_DATABASE > test.sql

it is throwing an error

mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need (at least one of) the RELOAD or FLUSH_TABLES privilege(s) for this operation (1227)

Doesn't ALL mean ALL (therefore, it will also give RELOAD and FLUSH_TABLES privilege)?

Well, I made sure that this is the good database I'm connecting to (it is). Double checked my permissions.

Holger Just

PROCESS is a global privilege. Your me user does not have this privilege as you have only granted all privileges on your me database, which does not grant global privileges.

You can grant the global privilege with

GRANT PROCESS TO `me`@`%`

This however will grant your me user access to information about all databases and all tables on the database server, which may not be what you want.

Instead of granting this privilege, you can thus use the --no-tablespaces option on your mysqldump command. While this will cause tablespaces to not be dumped, your user does not require the global PROCESS privilege anymore.

To quote the mysqldump documentation:

mysqldump requires at least the SELECT privilege for dumped tables, SHOW VIEW for dumped views, TRIGGER for dumped triggers, LOCK TABLES if the --single-transaction option is not used, and (as of MySQL 8.0.21) PROCESS if the --no-tablespaces option is not used. Certain options might require other privileges as noted in the option descriptions.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Why can't I get reproducible results in Keras even though I set the random seeds?

Why can't I .invokeExact() here, even though the MethodType is OK?

Linux, Why can't I write even though I have group permissions?

Why do I have a deadlock even though it includes an endless loop?

Why can't I use an apache httpcomponents object in spring-boot, even though it is listed in the MVN dependancies?

Why can't I build wheel for libsass even though it will install?

Python won't recognize mysql.connector even though I have it installed?

Why does Entity Framework try to SELECT all columns even though I have specified only two?

Why can't I import opencv3 even though the package is installed?

Why is my screen flickering even though I have double buffering on?

Can't Install Jenkins even though I have JAVA 8

Why is it saying a isnt defined even though i have defined you

AWS MySQL RDS can't create new DB user while having ALL PRIVILEGES

Why can't I delete a file even though I have write permissions?

"variable might not have been initialized" even though I make sure it is

Why can't I access a directory even though I'm in the owner group?

Why can I not hardlink to a file I don't own even though I can move it?

Visual studio can't find a controller even though I have added a reference to it and made sure it is public

Why are all my snap directories empty even though I have apps installed there?

Can I delete an object of a model from view even though the user doesn't have permission? Django

Can't run python programs in command prompt even though I have added python to Path

I can't get past a few do-while loops even though their conditions have not been met

Why DB Browser have an order I can't replicate?

Why .isNotNull(); assertions fails even though I have a controller class?

can I use callbackFlow even though I have not a callBackListener

Can't understand why I am getting tuple error even though I typed everything correctly

Why isn't the original value getting incremented twice even though I have two increments

Why can't I access certain servers even though they are up?

How come i can display an image from another website even though it doesn't have CORS headers?