MySQL backup and restore from command line -


I am using the command line for backups and restoring mysql database. I use the data in that database and keep it in the process. When is in the CMD line , then I mysqldump i.e

  .. & gt; Bin & gt; Mysqldump -u Route-Reports Data 1 & gt; Datafile.mysql  

When I use the above CMD, it creates a backup file with the name of Dtafile.mysql on the MySQL bin folder.

But the thing is that only back-up only tables, not process.

And when I am restoring it to an empty database in "Data 2"

  .. bin> Mysql - U Route - Patot Data 2 & lt; Dataafile.mysql  

What it does, it creates all tables and convert views in the table and no process has been restored.

This means that I can not restore all my tables, ideas and processes with my complete database backup.

Any of you can help it .. I am very grateful.

Include the "-routines" parameter for mysqldump and it will dump processes

Edit # 1: Your MySQLdump order should now be visible,

> mysqldump -u root -proot - routines Data1 & gt; Datafile.mysql

Edit # 2: You must add the --add-drop-table switch even if you want to preserve your view. The reason for this is that the scenes are made in two steps (first as the dummy tables, then in the form of real view). Also, please note that tables and views share the same namespace, so do not mislead by the output provided by the "Show table" command in mysqlclient. Instead, if you use "command view view vw_test", to make sure that your idea has been restored, then also look for bingo, then insert your data into related tables in other databases And then run a select query, if you have data related to killing bull's eyes, then you beat the back :) and you always have this wonderful addition to the Stackwormflow You can come back right.

Your mysqldump command should now look like this (to maintain the monitor)

  mysqldump -u root -prote - routines --add-drop-table Data1 & gt; Datafile.mysql  

hh


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -