摘要:
NZ0AZ-8U055-WZ9T1-Z137K-9C779 阅读全文
摘要:
情况,从服务器停宕机的时候对主服务器进行了写操作,当从服务器启动起来之后,show slave status的时候,发现Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'解决步骤:查看主服务器的file和position,然后在从服务器上执行stop slave;change master to master_host='172.16. 阅读全文
摘要:
实验环境:主从复制,一主,一从 master:localhost slave:172.16.21.164因为是测试环境,两台服务器,都没有为服务器设置密码1.检查两个服务器上的配置文件pt-config-diff h=localhost ,u=root h=172.16.21.164,u=root 阅读全文
摘要:
步骤:1.perl Makefile.PL2.make3.make test4.make installDESCRIPTIONThis document describes the installation and configuration of DBD::mysql, the Perl DBI driver for the MySQL database. Before reading on, make sure that you have the prerequisites available: Perl, MySQL and DBI. For details see the separa 阅读全文
摘要:
mysql> show binary logs;mysql> purge binary logs to 'binlog.000005';(删除mysql bin-log日志,删除binlog.000005之前的,不包括binlog.000005) 阅读全文
摘要:
binlog-do-db=sales 只记录sales库binlog-ignore-db=sales 除sales库不记录,其他都记录但是如果在操作数据库之前,不使用use $dbname 那么所有的SQL都不会记录,如果使用了use $dbname,那么判断规则取决于这里的$dbname,而不是SQL中操作的库 阅读全文
摘要:
mysql数据主从延时如何去判断呢?两种方法: 1.Seconds_Behind_Master 2. mk-heartbeat 日常工作中,对于MySQL主从复制检查,一方面我们要保证复制的整体结构是否正常,另一方面需要检查主从数据是否保持一致。对于前者我们可以通过监控复制线程是否工作正常以及主从延时是否在容忍范围内,对于后者则可以通过分别校验主从表中数据的md5码是否一致,来保证数据一致,可以使用Maatkit工具包中的mk-table- checksum工具去检查。方法1:通过监控show slave status\G命令输出的Seconds_Behind_Master参数的值来判断,是否 阅读全文