Update mysqldump.md (#376)

This commit is contained in:
项金 2022-06-17 10:51:05 +08:00 committed by GitHub
parent 1b3204c368
commit 49162f4197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -32,6 +32,7 @@ mysqldump(选项)
--password连接MySQL服务器的密码
--portMySQL服务器的端口号
--user连接MySQL服务器的用户名。
--skip-lock-tables: 不锁表导出
```
### 实例
@ -58,4 +59,12 @@ mysqldump -u linuxde -p -d --add-drop-table smgp_apps_linuxde > linuxde_db.sql
`-d`没有数据,`--add-drop-tabl`e每个create语句之前增加一个`drop table`
### 问题解决
**锁表失败**
```
mysqldump: Got error: 1044: "Access denied for user 'appuser'@'1%' to database 'tc_mall'" when doing LOCK TABLES
```
可使用`--skip-lock-tables`在导出数据阶段跳过锁表流程