更新时间:2023-02-02 21:31:39
mysqldump -u user -ppass -d olddb | mysql -u user -ppass -D newdb
新数据库必须已经存在. mysqldump命令中的-d
标志可防止复制数据.
The new database must already exist. The -d
flag in the mysqldump command prevents copying of data.
标志-p
与密码之间没有空格.
There's no space between the flag -p
and the password.