I have database called primary with 400 mysql tables, some triggers.
In theory I should able to carry mysqldump export and then use mysql to import it. And it works partially.
I found problem with triggers, functions . They are tagged as primary database and while compilation it fails as I am compiling it on another database.
mysql -p123 -utheprimary thesecondary < theprimary_bkup - Worked
But I had to carry within vi
I need to automate this task thru bash script. I think awk/sed should do the trick.