Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to fully dump a database with its stored procedures.

What I have tried:

I have tried to search about this and found how to do this using MySQL workbench but i want to make it using a script.
I also found this snippet to execute from MySQL command line:
shell> mysqldump [arguments] > file_name

Does any one know how to do this using a script in workbench?
Posted
Updated 2-Jul-18 16:44pm
Comments
Kornfeld Eliyahu Peter 22-Apr-18 13:32pm    
Have you read this: https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html?

1 solution

Hi,
you can use this command it will dump everything including stored procedure for a database only:
mysqldump -u USER -p  --events --routines --triggers --databases XXX


or for all database:
mysqldump -u USER -p  --events --routines --triggers --all-databases
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900