Error On Com_register_slave
Contents |
as plain text Hi Vidar, As our online manual says (section 4, "how to set up replication") * Set up special a replication user on the master with the FILE (in MySQL versions older than 4.0.2) or REPLICATION SLAVE privilege in newer MySQL versions. master command com_register_slave failed: access denied for user 1045 As you are using 4.0.10, the required privilege is REPLICATION SLAVE, not FILE. grant
Mysql Replication
replication slave on *.* to repl@stripped identified by "foobar"; is enough for your slave to connect to the master and read the master's binary log without errors. Then, about LOAD DATA FROM MASTER, you are right, our doc has lacks and I will correct them these days. See below. > on slave: > mysql> CHANGE MASTER TO MASTER_HOST='primarydbserver.ez.no', > MASTER_USER='repl', MASTER_PASSWORD='foobar'; > mysql> load data from master; > ERROR 1219: Error running query on master: Access denied. You need the > RELOAD privilege for this operation This means that the master wants repl@stripped to have the RELOAD privilege on the master. This is true because LOAD DATA FROM MASTER does FLUSH TABLES WITH READ LOCK on the master (closes and locks all tables before copying them), which requires RELOAD on the master. All slave actions on the master are run with the user you supplied in CHANGE MASTER, hence this user must have sufficient privileges to do FLUSH TABLES WITH READ LOCK. > > on master: > mysql> grant RELOAD on *.* to repl@stripped identified by > "foobar"; > > on slave: > mysql> load data from master; > ERROR 1219: Error running query on master: Access denied. You need the > SUPER privilege for this operation Same problem : LOAD DATA FROM MASTER does SHOW MASTER STATUS on the master which requires SUPER on the master. > on master: > mysql> grant SUPER on *.* to repl@stripped identified by > "foobar"; > > on slave: > mysql> load data from master; > Query OK, 0 rows affected (0.01 sec) > mysql> slave start; > Query OK, 0 rows affected (0.00 sec) > > However, in the logfile on the slave, I now get: > 30205 15:08:23 Slave I/O thread: connected to master > 'repl@stripped:3306', replication started in log > 'ez1-bin.001' at position 1192 > 030205 15:08:23 Error on COM_REGISTER_SLAVE: 1045 'Access denied for user: > 'repl@stripped' (Using password: YES)' > 030205 15:08:23 Slave I/O thread exiting, read up to log 'ez1-bin.001', > position 1192 This is because you granted FI
Community Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: Replication :: Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master New Topic Advanced Search Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master Posted by: Christopher Swearingen () Date: November 27, 2009 02:19PM I'm trying to set up a replication slave. Both the master and the slave are Win2003 servers running MySQL v5.1.34. The slave is not registering on the http://lists.mysql.com/bugs/13761 master and I'm perplexed. On the Master Using MySQL Administrator (v1.2.17) I've got is configured with these settings: -- Server ID = 1 -- Show Slave authentication Info = True (checked in MySQL Administrator) -- Log slave updates = true (checked) -- Binary logging enabled Using MySQL prompt; -- executed the command GRANT SLAVE http://forums.mysql.com/read.php?26,293283 REPLICATION ON *.* TO'root'@'192.168.1.17:3306' IDENTIFIED BY '[slave's PWD]'; (Query Ok, 0 rows affected) I've got the slave's MySQL Administrator's replication tab set up as: -- Server ID = 2 -- Show Slave authentication info = true (checked) -- Report Host = 192.168.1.17 -- Report User = Web02 -- Report Password = [Slave's Password] -- Master hostname = 192.168.1.5 On the MASTER -- Executed a FLUSH TABLES WITH READ LOCK; -- I noted the current log file (mysql-bin.000005) and position (3851446) with a SHOW MASTER STATUS; command -- took a snapshot of the data on the master using the MySQL Administrator backup utility to run all schemas to an SQL file. On the SLAVE -- imported the MASTER data via a restore in MySQL Administrator -- Executed the command CHANGE MASTER TO MASTER_HOST='192.168.1.5', MASTER_USER='Web02', MASTER_PASSWORD='[Slave's PWD]', MASTER_LOG_FILE='mysql-bin.000005', MASTER_LOG_POS=3851446'; (Query Ok, 0 rows affected) After stopping and restarting the SLAVE's MySQL service I get the following log: Trying to st
instance of JIRA has been disabled. You can use your same credentials to log in to the https://mariadb.atlassian.net/browse/MDEV-4961 new JIRA! MariaDB ServerMDEV-4961COM_REGISTER_SLAVE failed: Access denied for user https://github.com/nevill/zongji/issues/45 'xxxx'@'localhost'Log in PrintExport XMLExport Word Details Type: Bug Status: Closed Priority: Minor Resolution: Incomplete Affects Version/s: 5.5.32 Fix Version/s: None Component/s: None Labels: None Environment: OpenVZ Container on Proxmox VE 3.1 (http://www.proxmox.com/) Description Setup replication and error on test that it work. Create ssh tunnel with stunnel. Test that the tunnel works with: mysql -u root -h 10.0.0.1 -P 3310 -p mysql -u root -h 127.0.0.1 -P 3310 -p This DO NOT work mysql -u root -h localhost -P 3310 -p Change replication: stop error on com_register_slave slave; Change master to master_host='10.0.0.1', master_user='xxxx', master_port=3310 ...; start slave; Last IO Error = ... Access denied for user 'xxxx'@'localhost' ... The problem seems to be that it tries to connect to localhost in stead of the server ip (10.0.0.1). Localhost is a problem as explained in the article at: http://pve.proxmox.com/wiki/Stunnel_in_DAB_appliances Near the following position: If we use localhost instead of the IP (192.168.5.45) in the above mysql connect string, we will get an error like: I believe MariaDB it is trying to use a local socket and not 127.0.01 or 10.0.0.1 AttachmentsActivity People Assignee: Kristian Nielsen Reporter: Pierre Joubert Votes: 0 Vote for this issue Watchers: 2 Start watching this issue Dates Due: 2013-10-09 Created: 2013-08-28 20:19 Updated: 2013-10-24 16:58 Resolved: 2013-10-24 16:58 Powered by Atlassian4.0 r Terms of use Answers Maintenance schedule Atlassian
Sign in Pricing Blog Support Search GitHub This repository Watch 13 Star 96 Fork 25 nevill/zongji Code Issues 12 Pull requests 5 Projects 0 Pulse Graphs New issue Make it possible to restart ZongJi on error #45 Closed numtel opened this Issue Jun 6, 2016 · 3 comments Projects None yet Labels enhancement Milestone No milestone Assignees No one assigned 1 participant Collaborator numtel commented Jun 6, 2016 • edited In #41 (comment), I have suggested a method of making it possible to recover from errors and disconnections. Make it possible to determine the current binlog filename Currently, findBinlogEnd only determines the filename if the startAtEnd option is true. Otherwise, that value is an empty string. Either way, this value is not externally available the way the code is right now. Binlog position is available as a property of each event. It seems like the optimal patch would simply add a property for the current binlog file name. Make it possible to start reading binlog events from a specific filename and position Will have to create configuration options that modify the binlogOptions object I'm not sure how much time I'll get to work on this soon so if anybody wants to help look into what it will take to do this, that would be awesome. numtel added the enhancement label Jun 6, 2016 Collaborator numtel commented Jun 19, 2016 • edited To get the current binlog filename, it looks like the ctrlConnection could be used to run a SHOW SLAVE STATUS query but in order for ZongJi replication clients to show up on this list, they must send the COM_REGISTER_SLAVE packet before the COM_BINLOG_DUMP packet. In this commit, I have created and tried to send this packet but it causes this error. The COM_REGISTER_SLAVE packet sends without causing an error but the original COM_BINLOG_DUMP causes this error if that COM_REGISTER_SLAVE has been sent. Error: Packets out of order. Got: 1 Expected: 2 at Parser.write (/vagrant/zongji/node_modules/mysql/lib/protocol/Parser.js:39:19) at Protocol.write (/vagrant/zongji/node_modules/mysql/lib/protocol/Protocol.js:39:16) at Socket.