如何从MYSQLDUMP备份文件中获取change master to 信息
时间:2010-07-26 来源:909413335
D:\mysql6\bin>mysqldump -ucpc -p123 --master-data -h192.168.1.69 cpc>c:\cpc0628.sql |
2:得到的CPC0628.SQL有4.5G,超大文件,用普通的文本查看工具打开失败。现在要取出里面的change master to 命令,做复制时使用。可以用如下命令
C:\Documents and Settings\Administrator>more c:\0627.sql -- MySQL dump 10.13 Distrib 5.1.45, for Win32 (ia32) -- -- Host: localhost Database: cpc -- ------------------------------------------------------ -- Server version 5.1.45-community-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Position to start replication or point-in-time recovery from -- CHANGE MASTER TO MASTER_LOG_FILE='mysql.000013', MASTER_LOG_POS=147977999; -- -- Table structure for table `a` -- DROP TABLE IF EXISTS `a`; /*!40101 SET @saved_cs_client = @@character_set_client */; -- More (0%) -- |
红色标注为取出来的参数。