The error in the first method is almost certainly due to foreign key checks. If you're using phpMyAdmin to import, there should be a checkbox "disable foreign key checks" you can use when importing.
For the second, the problem is most likely the "Preferred site URL" option in admin. If you can't get to the admin to change it on the new domain, look in the qa_options table, it's the option "site_url".