Project

General

Profile

Mysqldump of your database » History » Revision 5

Revision 4 (Anchi Cheng, 02/12/2015 12:44 PM) → Revision 5/6 (Anchi Cheng, 08/01/2019 12:26 PM)

h1. Mysqldump of your databases 

 mysqldump is a tool comes with mysql installation that creates mysql commands that can reproduce the database when executed on a different host. 

 If you run into problems that you can not decribe the history of getting there to leginon team, this might be the best way for us to dicover what went run. 
 You will need help from the person who installed the packages if you don't know what the name of the databases are and the mysql user that have the permission to do this. 
 A hint: the information is in sinedon.cfg 

 Once these are figured out, here is the command using our standard naming used in this wiki. 

 h2. whole leginon and project databases 
 <pre> 
 mysqldump -h your_host -u usr_object -p leginondb > your_leginondb_dump.sql 
 mysqldump -h your_host -u usr_object -p projectdb > your_projectdb_dump.sql 
 </pre> 

 Each of these commands will ask you for the password. 

 h2. Individual table 

 That's say you want to dump FocuserSettingsData table from leginon database that is called leginondb, you should do 

 <pre> 
 mysqldump -h your_host -u usr_object -p leginondb FocuserSettingsData > your_table_dump.sql 
 </pre> 

 


 ________________ 

 [[Load mysqldumped databases|Load the saved databases >]]