MYSQL file replication and backup

Next weekend to study the data structure of mysql, record:

Scenario 1: When copying a database from one computer to mysql data folder to another computer will find the table does not exist, functions, and so there is no

Method: 1, we need to ibdata1 under the root directory of a copy of the data in order to view the table structure with navicat

   2, the function of the database is stored in proc.MYD under data \ mysql, all or copying files, or find the appropriate library function to copy the past

Scenario 2: database backup

方法:mysqldump -hlocalhost -uroot -p123456 --opt --routines database> E:\mysql-5.7.15-winx64\databack\database-%date:~0,4%%date:~5,2%%date:~8,2%.sql

Description: mysqldump -h server address -u user name -p password --opt --routines (exported functions, and stored procedures) database name> storage path \ database name - the current time (yyyyMMdd) .sql

Guess you like

Origin www.cnblogs.com/xiufengd/p/11785986.html