mysqldump -u username -p dbname > dbname.sql
mysqldump: Got error: 1044: Access denied for user XXX to database XXX when using LOCK TABLES 解决方法: mysqldump -u dbuser -ppass db --skip-lock-tables > db.sql
mysqldump -u username -p dbname > dbname.sql
mysqldump: Got error: 1044: Access denied for user XXX to database XXX when using LOCK TABLES 解决方法: mysqldump -u dbuser -ppass db --skip-lock-tables > db.sql