在线mysql db运行1年多
该db多了复制(源机器为a     复制机器为b ),
现在检查 复制机器b的某表    同a 的同名表记录数比较,
结果发现 复制机器b的记录数量要少很多 。  
于是我自12月起 每天统计记录数量  发现每天少100来条。为什么mysql的复制能力会这么弱  (至少在sqlserver下没有出现这个情况的)?

解决方案 »

  1.   

    略等  我把我的篇配置给贴欻来  清版主鉴定
    character-set-server=utf8
    default-collation=utf8_unicode_ci
    datadir=/mydb/mysql
    socket=/var/log/mysql/mysql.sock
    user=mysql
    # Default to using old password format for compatibility with mysql 3.x
    # clients (those using the mysqlclient10 compatibility package).
    old_passwords=1
    innodb_data_home_dir=/db
    default-table-type=INNODB
    #Replication
    log-bin = /var/log/mysql/mysql-bin.log
    binlog-do-db=rundb
    server-id=1table_cache = 1024
    key_buffer = 256M
    record_buffer = 16M
    wait_timeout=800
    connect_timeout=25
    interactive_timeout=800
    max_connections=500
    sort_buffer = 128M
    innodb_log_file_size = 50M
    innodb_log_buffer_size = 8M
    innodb_buffer_pool_size = 1300MB
    innodb_thread_concurrency=50
    innodb_flush_method=O_DSYNC
    innodb_status_file = 1
    innodb_flush_log_at_trx_commit = 0
    innodb_autoextend_increment = 25M
    skip-external-locking
    innodb_table_locks=0max_allowed_packet=32M
    tmp_table_size=96M
    thread_concurrency=10
    thread_cache_size=500#result set and query cache
    query_cache_type = 0
    query_cache_size = 0long_query_time = 1这个是master的配置
    复制 有时候断开  平均2个月发生一起
    不知道哪里有巍峨问题?
      

  2.   

    复制机器的配置文件
    master-host=1。
    master-user=rep
    master-password=rep
    master-connect-retry=60
    replicate-do-db=rundb
    skip-slave-start
    slave-skip-errors=1062log-bin = /var/log/mysqld/bin.log
    log-bin-index = /var/log/mysqld/log-bin.index
    log-error = /var/log/mysqld/error.logrelay-log = /var/log/mysqld/relay.log
    relay-log-info-file = /var/log/mysqld/relay-log.info
    relay-log-index = /var/log/mysqld/relay-log.index###OS TUNNING####
    default-character-set=utf8skip-slave-start
    slave-skip-errors=1062character-set-server=utf8
    default-collation=utf8_unicode_ci
    default-table-type=INNODB
    wait_timeout=800
    connect_timeout=25
    interactive_timeout=800
    max_connections=50
    sort_buffer = 28M
    group_concat_max_len=65536
    innodb_buffer_pool_size=200MB
    innodb_additional_mem_pool_size=20M
    innodb_log_file_size=128M
    innodb_log_buffer_size=8M
    innodb_thread_concurrency=500
    innodb_flush_method=O_DSYNC
    table_cache=800
    innodb_status_file = 1
    innodb_flush_log_at_trx_commit = 0
    innodb_autoextend_increment = 25M
    skip-external-locking
    innodb_table_locks=0
    max_allowed_packet=32M
    tmp_table_size=96M
    thread_concurrency=10
    thread_cache_size=500long_query_time = 1这是配置的   不知道哪里有问题??
      

  3.   

    发现是2边的库的字符集不匹配地1个是latin
    第2个是 utf-8是否是这个原因导致??