I am trying to backup a single schema on a Windows server and restore it to an Ubuntu 12.04 Linux server running MySQL 5.5.4. The schema includes views and functions. When I used the MySQL Workbench "export" feature (including data and structure), most of the views were not imported to the new server.

Great if someone could share how to do this via Workbench, otherwise, I just need the syntax to do a complete dump from the CLI and it's restore equivalent.

  • Did you get errors when you restored the dump on the target machine? Is the dump complete, i.e. does it contain all the views? There must be a reason why most views did not make it which would happen also by using the CLI. Find out what that is. – Mike Lischke Jan 20 '15 at 8:17
  • use mysqldump -uroot -p -B <your-database> --routines --events --triggers --lock-all-tables >output_file.sql and use following to restore mysql -uroot -p <output_file.sql..share error if you face any of them.. – Nawaz Sohail Jan 20 '15 at 9:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.