mysqldump -u user -ppass -d olddb | mysql -u user -ppass -D newdb
The new database must already exist. The -d flag in the mysqldump command prevents copying of data.
There’s no space between the flag -p and the password.
mysqldump -u user -ppass -d olddb | mysql -u user -ppass -D newdb
The new database must already exist. The -d flag in the mysqldump command prevents copying of data.
There’s no space between the flag -p and the password.