willbryant / kitchen_sync

Fast unidirectional synchronization - make or efficiently update a copy of a database, without slow dumping & reloading
MIT License
282 stars 35 forks source link

access denied for FTWRL #86

Closed martyzz1 closed 4 years ago

martyzz1 commented 4 years ago

My password contains special characters like } { < > e.g. Axa}vw7>9

I ran it through a url encoder and I still get access denied..

Kitchen Sync Error in the 'from' worker: Access denied for user 'my_user'@'%' (using password: YES) FLUSH TABLES WITH READ LOCK Connection closed Error in the 'from' worker: Connection closed Kitchen Syncing failed.

If I manually connect to the database using the same credentials from the same host, it works fine...

Any ideas?

martyzz1 commented 4 years ago

hmmm after much testing it turns out this is something I just get if I set --workers 4. and might not be due to password special chars

willbryant commented 4 years ago

So --workers 2 is OK? Or any --workers more than 1 has the problem?

martyzz1 commented 4 years ago

--workers 1. is ok --workers 2 fails --workers > 2 fail

willbryant commented 4 years ago

OK cool. So I think this will probably just be because you don't have the necessary permissions for FLUSH TABLES WITH READ LOCK under the user you are connecting as. I guess the error message must be version dependent - eg. I'm using MariaDB 10.4 on my laptop and I get a clearer error message "ERROR 1227 (42000): Access denied; you need (at least one of) the RELOAD privilege(s) for this operation".

You could try connecting as root or granting my_user the right permission. What version of mysql or mariadb are you using?

martyzz1 commented 4 years ago

Interestingly I got that permission RELOAD error when I first ran it with 1 worker... So I granted the permission, and it worked. But I think workers 2 still failed....

I will double check this and come back to you...

willbryant commented 4 years ago

Wat

willbryant commented 4 years ago

Any update?

martyzz1 commented 4 years ago

sorry, my project moved on and I switched to pgloader...