标题: mysqldump: Got error: 2002: Can't connect to local MySQL server through socke... [打印本页] 作者: jiawang 时间: 2024-8-6 20:34 标题: mysqldump: Got error: 2002: Can't connect to local MySQL server through socke... 本帖最后由 jiawang 于 2024-8-6 20:34 编辑
使用mysqldump备份所有数据库报错:
[root@sztech ~]# mysqldump -uroot -p --socket=/data/mysql/mysql.sock --all-databases > all_databases_backup.sqlEnter password:
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/data/mysql/mysql.sock' (2) when trying to connect