备份
除去默认数据库, 导出所有数据
1 | mysql -u root -h xxxx -pxxx -e "show databases" | grep -Ev "performance_schema|information_schema|mysql|test|Database" | xargs -I {} mysqldump -u root -h xxxx -pxxx--skip-lock-tables --databases {} > all_data.sql |
1 | mysql -u root -h xxxx -pxxx -e "show databases" | grep -Ev "performance_schema|information_schema|mysql|test|Database" | xargs -I {} mysqldump -u root -h xxxx -pxxx--skip-lock-tables --databases {} > all_data.sql |
原文作者:Momo
原文链接:https://mo.xmomo521.top/2021/11/18/mysqldump常用命令/
发表日期:November 18th 2021, 6:04:28 pm
更新日期:December 21st 2021, 3:32:58 pm
版权声明:本文采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: true
tags: true