10年工作经验,专研网站运维。
全部博文(454)
分类: 系统运维
2015-08-07 13:56:49
1. Backup two database
Mysqldump coalboss > coalboss20150807.sql
2. Query database
mysql
Show databases;
Select version();
Use mysql;
Show tables;
Desc tablename;
Show columns from tablename;
Show warnings;
3. Dump dabatase
Mysqldump coalboss > coalboss20150807.sql
Mysqldump –d coalboss > tablestructure.sql
Mysql coalboss < coalboss.sql
4. Remote transfer file
scp -P 1842 -r tablestructure.sql root@141.400.246.61:/data/mysqlbackup
5. Check the difference between tow file
diff tablestructurePro.sql tablestructure.sql > diff.txt