后经过修改后 Last_IO_Errno已经不再报错误,但是还是不能同步,求回答

解决方案 »

  1.   

    把你现在的slave状态再贴一下看看呢?show slave status\G;
      

  2.   

    现在还是下面的这个:
    Master_SSL_Verify_Server_Cert: No
                    Last_IO_Errno: 2003
                    Last_IO_Error: error reconnecting to master '[email protected]:3306' - retry-time: 60  retries: 86400
                   Last_SQL_Errno: 0
                   Last_SQL_Error:
    1 row in set (0.00 sec)ERROR:
    No query specified会不会与主服务器的my.ini文件有关:
    下面的是主服务器的my.ini文件,太长了,删掉了一部分注释[client]port=3306[mysql]default-character-set=utf8
    max_allowed_packet=16M
    [mysqld]# The TCP/IP Port the MySQL Server will listen on
    port=3306server-id=6
    log-bin=C:\MySQL\MySQL_Server 5.1\mysqllog\mysql-bin#Path to installation directory. All paths are usually resolved relative to this.
    basedir="C:/MySQL/MySQL_Server 5.1/"#Path to the database root
    datadir="D:/MySQLnew/MySQL Server 5.1/data/"# The default character set that will be used when a new schema or table is
    # created and no character set is defined
    default-character-set=utf8# The default storage engine that will be used when create new tables when
    default-storage-engine=INNODB# Set the SQL mode to strict
    sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"# The maximum amount of concurrent sessions the MySQL server will
    # allow. One of these connections will be reserved for a user with
    # SUPER privileges to allow the administrator to login even if the
    # connection limit has been reached.
    max_connections=350
    query_cache_size=256M
    table_cache=800# Maximum size for internal (in-memory) temporary tables. If a table
    # grows larger than this value, it is automatically converted to disk
    # based table This limitation is for a single table. There can be many
    # of them.
    tmp_table_size=128M
    open-files-limit = 2048thread_cache_size=38#*** MyISAM Specific options# The maximum size of the temporary file MySQL is allowed to use while
    # recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
    # If the file-size would be bigger than this, the index will be created
    # through the key cache (which is slower).
    myisam_max_sort_file_size=100G# If the temporary file used for fast index creation would be bigger
    # than using the key cache by the amount specified here, then prefer the
    # key cache method.  This is mainly used to force long character keys in
    # large tables to use the slower key cache method to create the index.
    myisam_sort_buffer_size=83M# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
    # Do not set it larger than 30% of your available memory, as some memory
    # is also required by the OS to cache rows. Even if you're not using
    # MyISAM tables, you should still set it to 8-64M as it will also be
    # used for internal temporary disk tables.
    key_buffer_size=384M# Size of the buffer used for doing full table scans of MyISAM tables.
    # Allocated per thread, if a full scan is needed.
    read_buffer_size=5M
    read_rnd_buffer_size=20M# This buffer is allocated when MySQL needs to rebuild the index in
    # REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE
    # into an empty table. It is allocated per thread so be careful with
    # large settings.
    sort_buffer_size=16Minnodb_additional_mem_pool_size=64Minnodb_flush_log_at_trx_commit=1# The size of the buffer InnoDB uses for buffering log data. As soon as
    # it is full, InnoDB will have to flush it to disk. As it is flushed
    # once per second anyway, it does not make sense to have it very large
    # (even with long transactions).
    innodb_log_buffer_size=3M# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
    # row data. The bigger you set this the less disk I/O is needed to
    # access data in tables. On a dedicated database server you may set this
    # parameter up to 80% of the machine physical memory size. Do not set it
    # too large, though, because competition of the physical memory may
    # cause paging in the operating system.  Note that on 32bit systems you
    # might be limited to 2-3.5G of user level memory per process, so do not
    # set it too high.
    innodb_buffer_pool_size=800M# Size of each log file in a log group. You should set the combined size
    # of log files to about 25%-100% of your buffer pool size to avoid
    # unneeded buffer pool flush activity on log file overwrite. However,
    # note that a larger logfile size will increase the time needed for the
    # recovery process.
    innodb_log_file_size=58M# Number of threads allowed inside the InnoDB kernel. The optimal value
    # depends highly on the application, hardware as well as the OS
    # scheduler properties. A too high value may lead to thread thrashing.
    innodb_thread_concurrency=18innodb_thread_sleep_delay=300 #Enter a name for the error log file. Otherwise a default name will be used.
    log-error=ErrorLog
    #Enter a name for the slow query log. Otherwise a default name will be used.
    log-slow-queries=slowQueryLog
    #Tells the master it should log updates for the specified database, and exclude all others not explicitly mentioned.
    binlog-do-db=total_fy
    #Binary log will be rotated automatically when the size exceeds this value. Will also apply to relay logs if max_relay_log_size is 0. The minimum value for this variable is 4096.
    max_binlog_size=10M
    #Log all queries that have taken more than long_query_time seconds to execute to file.
    long_query_time=5
    #The number of seconds the server waits for activity on an interactive connection before closing it.
    interactive_timeout=14400
    #The number of seconds the server waits for activity on a connection before closing it
    wait_timeout=14400
    #Don't resolve hostnames. All hostnames are IP's or 'localhost'.
    skip-name-resolve
      

  3.   

      Last_IO_Error: error reconnecting to master '[email protected]:3306' - retry-time: 60  retries: 86400
    明显没有连上 master库啊,你直接用repl用户名可以连上吗?不是本机连上,是使用远程的机器连接。
      

  4.   

    slave的my.cnf文件加上这个参数试试skip-name-resolve   #禁用dns解析,重启mysql服务