MySQL dump, ignore all except tables and table data

How do I create a MySQL dump command line that ignores views, stored procs, triggers, everything except tables and table data? All I want to transfer from one db on a server to another db on a different server is table /drop /create and table data.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nociSoftware EngineerCommented:
A Mysqldump is just a plain Tekst file with SQL statements.
You can remove all statements that you don't like from it.
(Due to the fairly rigid format this can be scripted without too much trouble).
mysqldump does not include data from views. only the table definition so it is not really a problem to transfer views as they cost nothing

you can skip individual views manually using --ignore-table

afaik there is no option to skip all views but you can easily list them with "show views" and exclude the returned list
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Also triggers + events are excluded by default.

To include them you must specify --triggers + --events as mysqldump command line options.

Same applies to --routines, which relates to stored procedures.

This will also vary between mysql installations, as --events is fairly new, so many current installs don't even support the --events option.

Refer to your install docs for exact details.

In general, you'll have to come up with a procedure, like skullnobrains suggested, to exclude views + material views. Everything else you mentioned will be excluded by default (no --events or --triggers options passed).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
theGhost_k8Database ConsultantCommented:
Well apart from above comments did you know about mysqldumpsplitter? It is also there on git. That can be use full if you're already having the full dump.
BobbyAuthor Commented:
Thanks all.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.