莹莹科技 发表于 2026-4-12 20:30:02

【待反馈】备份MySQL数据库出错

为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:v10.0.2-LTS
系统版本:Ubuntu 20.04.4 LTS
问题描述:计划任务备份数据库时,Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock',我在终端中执行自动创建的备份脚本,没有错误产生。
相关截图(日志、错误):

莹莹科技 发表于 2026-4-12 20:32:13

|-mysqldump: Using a password on the command line interface can be insecure.
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect

大炮运维V587 发表于 2026-4-13 15:15:39

莹莹科技 发表于 2026-4-12 20:32
|-mysqldump: Using a password on the command line interface can be insecure.
mysqldump: Go ...

您好,您看下是不是修改过MySQL的配置,提示是无法通过 mysqldump找不到mysql的套接字文件,导致无法连接当前的数据库;当前通过面板上安装的数据库走的是/tmp/mysql.sock
页: [1]
查看完整版本: 【待反馈】备份MySQL数据库出错