日期:2014-05-16  浏览次数:20782 次

mysql启动错误信息
以下是我mysql启动的信息,不知道怎么回事,报ERROR,想请教一下各位大侠:
111031 15:34:35 mysqld_safe mysqld from pid file /var/lib/mysql/leo.pid ended
111031 15:34:35 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
111031 15:34:35 [Warning] The syntax '--log' is deprecated and will be removed in a future release. Please use '--general-log'/'--general-log-file' instead.
111031 15:34:35 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
111031 15:34:36 [Note] Plugin 'FEDERATED' is disabled.
111031 15:34:36 InnoDB: The InnoDB memory heap is disabled
111031 15:34:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
111031 15:34:36 InnoDB: Compressed tables use zlib 1.2.3
111031 15:34:36 InnoDB: Using Linux native AIO
111031 15:34:36 InnoDB: Initializing buffer pool, size = 2.0G
111031 15:34:36 InnoDB: Completed initialization of buffer pool
111031 15:34:36 InnoDB: highest supported file format is Barracuda.
111031 15:34:36 InnoDB: Waiting for the background threads to start
111031 15:34:37 InnoDB: 1.1.6 started; log sequence number 29332267794
111031 15:34:39 [Note] Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log './mysql-relay-bin.000004' position: 4
111031 15:34:39 [Note] Event Scheduler: Loaded 0 events
111031 15:34:39 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.11-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
111031 15:34:39 [ERROR] Slave I/O: error connecting to master 'repliwork@leo:3306' - retry-time: 60 retries: 86400, Error_code: 1045
111031 15:35:31 [Note] Start binlog_dump to slave_server(2), pos(mysql-bin.024359, 8909076)
加粗的地方是我重点要解决的,此服务器为主服务器,我在从服务器上show slave status得到的 Slave_IO_Running和Slave_SQL_Running都是YES,真不知道哪里错了


------解决方案--------------------
slave的数据已经跟上master的数据了吗?主服务器重启的时候怎么会connecting to master,难道你这个主服务器又是某一台mysql服务器的从服务器?
------解决方案--------------------
主库上不允许从库访问 在主上开下这个用户的复制权限
------解决方案--------------------
可能是启动当时的网络环境不好,导致连接失败,然后记录了一个错误,随后又连上了,所以IO线程是YES。

主从看IO和SQL线程,都是YES,就行了。
------解决方案--------------------
你用的是mysql5.5的版本吧,这个版本不支持master这样的语法,看下这篇文章http://webteam.blog.51cto.com/863355/738310