mysql主从复制master端口更改问题

我在做mysql主从复制的时候,master端mysql端口一直都是默认的3306,我就想换一个端口,master服务器端口更改完成以后,到slave端进行change操作,这个操作默认端口是3306,所以我在命令里加了一条“master_port=端口”,结果这个命令没有这个参数,然后我又在”master_host=ip“后面加了端口,改成了"master_host=ip:端口",命令执行成功了,但是启动slave的时候报错 1. row
Slave_IO_State: Connecting to master
Master_Host: 192.168.2.148:33060
Master_User: backup
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000011
Read_Master_Log_Pos: 345
Relay_Log_File: relay-log-bin.000001
Relay_Log_Pos: 4
Relay_Master_Log_File: mysql-bin.000011

Slave_IO_Running: Connecting
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 345
Relay_Log_Space: 107
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: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 2005

Last_IO_Error: error connecting to master '[email protected]:33060:3306' - retry-time: 60 retries: 86400
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1

他把master_host中的参数当做是主机,后跟默认端口3306,

不知道有没有别的办法可以解决这个问题,还是master端的端口不能更改???!!!

猜你喜欢

转载自blog.51cto.com/14437270/2418510