mysql主从复制:Slave_IO_Running、Slave_SQL_Running都为Yes,但是不能同步,Last_IO_Error:2003和Last

kunkunqian 2014-08-11 10:07:39
主服务器:
mysql> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 | 106 | total_fy | |
+------------------+----------+--------------+------------------+
从服务器:
mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 61.132.75.77
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000001
Read_Master_Log_Pos: 106
Relay_Log_File: user-8dd5cf8024-relay-bin.000003
Relay_Log_Pos: 251
Relay_Master_Log_File: mysql-bin.000001
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table: imonitor.analysisconfig,imonitor.apn_user
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 106
Relay_Log_Space: 416
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 2003
Last_IO_Error: error reconnecting to master 'repl@61.132.75.77:3306' - retry-time: 60 retries: 86400
Last_SQL_Errno: 0
Last_SQL_Error:
1 row in set (0.00 sec)

ERROR:
No query specified
...全文
815 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
jascjasc 2014-08-12
  • 打赏
  • 举报
回复
slave的my.cnf文件加上这个参数试试skip-name-resolve #禁用dns解析,重启mysql服务
qq_17859693 2014-08-11
  • 打赏
  • 举报
回复
Last_IO_Error: error reconnecting to master 'repl@61.132.75.77:3306' - retry-time: 60 retries: 86400 明显没有连上 master库啊,你直接用repl用户名可以连上吗?不是本机连上,是使用远程的机器连接。
kunkunqian 2014-08-11
  • 打赏
  • 举报
回复
现在还是下面的这个: Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 2003 Last_IO_Error: error reconnecting to master 'repl@61.132.75.77: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=3306 server-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 = 2048 thread_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=16M innodb_additional_mem_pool_size=64M innodb_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=18 innodb_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
qq_17859693 2014-08-11
  • 打赏
  • 举报
回复
把你现在的slave状态再贴一下看看呢?show slave status\G;
kunkunqian 2014-08-11
  • 打赏
  • 举报
回复
后经过修改后 Last_IO_Errno已经不再报错误,但是还是不能同步,求回答

56,937

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧