MySQL Workbench mysqldump:“访问被拒绝;尝试转储表空间时,您需要(至少一项)此操作的 PROCESS 权限

tea*_*sis 5 mysqldump mysql-workbench mysql-8.0

在Mysql 8上使用workbench时,出现以下错误:

mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces
Run Code Online (Sandbox Code Playgroud)

Bug #30350829我在发行说明中了解到

看来有--no-tablespaces必要补充一下。

--no-tablespaces使用MySQL Workbench中的导出工具时如何添加?

小智 1

(在 Microsoft Windows 中使用命令行的解决方法)

在 MysqlWorkbench 中,右键单击您的数据库连接,单击“编辑连接...”,记住您的主机名、端口、用户名、密码。

打开cmd.exe

进入 MySQL Workbench 文件夹:

cd "C:\Program Files\MySQL\MySQL Workbench 8.0 CE"
Run Code Online (Sandbox Code Playgroud)

运行 mysqldump.exe:

mysqldump.exe --all-databases --host=YOUR_HOSTNAME --port=YOUR_PORT --default-character-set=utf8 --user=YOUR_USER --password=YOUR_PASSWORD --protocol=tcp --single-transaction=TRUE --column-statistics=0 --no-tablespaces > my_dump.sql
Run Code Online (Sandbox Code Playgroud)

当然,不要像这样在命令行中使用密码,因为它不安全。