Issue
I have to replace this string in dump file :
use clients_db;
by
use client;
The name of database is different between the environment src and dest.
I tried with using sed, but it doesn't work because the file is so big.
Thank you in advance
Solution
This should do the job without editing your file:
sed 's/^use clients_db;/use client;/' clients_db_dump.sql | docker exec -i database mysql -uuser -ppass clients
I assume that there are no spaces before use clients_db;
.
Answered By - Cyrus Answer Checked By - Senaida (WPSolving Volunteer)