How to change old-domain URL to new-domain URL in all tables via command line
You can take backup of whole db to .sql file using mysqldump command and do the replace and import it back.
To take the backup of the database to sql file
mysqldump --opt -uUSERNAME -pPASSWORD -h MYSQLDOMAIN YOURDB > yourdbdump.sql
To replace text in .sql file
sed -ie 's/old-domain.com/new-domain.com/g' yourdbdump.sql
To restore it back
mysql -uUSERNAME -pPASSWORD -h MYSQLDOMAIN YOURDB < yourdbdump.sql