server-id=2
master-host=192.168.1.200
master-user=slave1
master-password=123456
master-port=3333
master-connect-retry=60
replicate-do-db=zoutuo
这个是我slave端my.ini的配置,现在这样配置后服务器不来,报错:111225 22:23:40 [Note] Plugin 'FEDERATED' is disabled.
111225 22:23:40 InnoDB: The InnoDB memory heap is disabled
111225 22:23:40 InnoDB: Mutexes and rw_locks use Windows interlocked functions
111225 22:23:40 InnoDB: Compressed tables use zlib 1.2.3
111225 22:23:40 InnoDB: Initializing buffer pool, size = 55.0M
111225 22:23:40 InnoDB: Completed initialization of buffer pool
111225 22:23:40 InnoDB: highest supported file format is Barracuda.
111225 22:23:40 InnoDB: Waiting for the background threads to start
111225 22:23:41 InnoDB: 1.1.8 started; log sequence number 1595675
111225 22:23:41 [ERROR] MySQL: unknown variable 'master-host=192.168.1.200'
111225 22:23:41 [ERROR] Aborting111225 22:23:41 InnoDB: Starting shutdown...
111225 22:23:41 InnoDB: Shutdown completed; log sequence number 1595675
111225 22:23:41 [Note] MySQL: Shutdown complete它提示错误的变量“master-host=192.168.1.200”。这是为什么呢?
master-host=192.168.1.200
master-user=slave1
master-password=123456
master-port=3333
master-connect-retry=60
replicate-do-db=zoutuo
这个是我slave端my.ini的配置,现在这样配置后服务器不来,报错:111225 22:23:40 [Note] Plugin 'FEDERATED' is disabled.
111225 22:23:40 InnoDB: The InnoDB memory heap is disabled
111225 22:23:40 InnoDB: Mutexes and rw_locks use Windows interlocked functions
111225 22:23:40 InnoDB: Compressed tables use zlib 1.2.3
111225 22:23:40 InnoDB: Initializing buffer pool, size = 55.0M
111225 22:23:40 InnoDB: Completed initialization of buffer pool
111225 22:23:40 InnoDB: highest supported file format is Barracuda.
111225 22:23:40 InnoDB: Waiting for the background threads to start
111225 22:23:41 InnoDB: 1.1.8 started; log sequence number 1595675
111225 22:23:41 [ERROR] MySQL: unknown variable 'master-host=192.168.1.200'
111225 22:23:41 [ERROR] Aborting111225 22:23:41 InnoDB: Starting shutdown...
111225 22:23:41 InnoDB: Shutdown completed; log sequence number 1595675
111225 22:23:41 [Note] MySQL: Shutdown complete它提示错误的变量“master-host=192.168.1.200”。这是为什么呢?
解决方案 »
- MYsql 作HA 求解啊!~~~~~~~~
- 增大innodb_log_file_size,删除两个原有日志文件后重启动却多出了一个ib_arch_log_0000000002文件
- Navicat 备份mysql是用的什么方法?怎么能备份成二进制文件?
- 【求助】我的mysql root用户
- 怎样把access的数据文件中的数据导入到mysql数据库中?
- 各位 这个SQl语句应该如何写会更加高效?
- 财务报告
- 续论坛单日最高帖HQL语句
- my.ini setup中那六个选项mysqld-shareware,mysqld.exe,mysqld-max.exe mysqld-opt.exe......有什么区别?应该用哪一个?
- 请问如何在两个mysql数据库之间导数据?
- 1成了!
- mysql的order by convert(column using gbk) asc怎么提升性能?
你需要用change master to master_host='ss',master_user='aa',master_password='sss',master_log_file='ss',master_log_pos=4;来设置slave
log-bin = /data0/mysql/binlog/binlog
replicate-do-db = test
replicate-ignore-db = mysql, information_schema
change master to master_host='192.168.1.200', master_user='', master_password='', aster_log_file='', master_log_pos=;master_log_file,master_log_pos由上面主服务器查出的状态值中确定。master_log_file对应File,master_log_pos对应Position。这些都可以在主服务器上查出来
show master status
mysql 5.x以上版本已经不支持在配置文件中指定主服务器相关选项。
不写在配置文件中(my.ini),在mysql的shell中执行。
可以参考一下这篇文章,说的很详细
mysql> change master to master_host='192.168.1.200', master_user='slave1',master
_password='123456',master_log_file='mysql-log.000005' master_log_pos='107';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'maste
r_log_pos='107'' at line 1
mysql>我这么写有问题吗?怎么提示错误呢?还有你给的这个链接我打不开啊。
_password='123456',master_log_file='mysql-log.000005' master_log_pos='107';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'maste
r_log_pos='107'' at line 1
我这么写有问题吗,我觉得写的对呢?
还有你发的这个链接我打不开啊?