当前位置:网站首页>MySQL - database backup

MySQL - database backup

2022-07-03 21:03:00 Can't learn java

1、 Why backup

  • Ensure that important data is not lost
  • Data transfer

2、MySQL The way of database backup

  • Copy physical files directly

  • stay sqlyog This visualization tool exports by hand

    • In the table or library you want to export , Right click to select backup or export
       Insert picture description here
  • Use the command line to export mysqldump Command line

--  export 
mysqldump -h host  -u user name  -p password   database  [ Table name 1  Table name 2 ···] > route / file name 


--  Import 
-- 1. In the case of login ( To import a table, switch to the specified database )
source  route / file name 

-- 2. Without login 
mysql -u user name  -p password   Library name  < route / file name 
原网站

版权声明
本文为[Can't learn java]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/184/202207032102105706.html

随机推荐