CanastaWiki / Canasta-DockerCompose

Docker Compose stack template for Canasta
MIT License
13 stars 15 forks source link

Problem with my.cnf client variable when using mysqldump #33

Open silverhikari opened 1 year ago

silverhikari commented 1 year ago

when running mysqldump to back up the mysql database of the wiki(if there is a better way of doing this for canasta, i would be intrigued to know), i noticed when running it in verbose mode there was a error "mysqldump: [ERROR] unknown variable 'skip-binary-as-hex=true'" being thrown when trying to output the backup. after doing some research(and looking over the problem for the origin of the my.cnf variables) found out this is caused by the variables in the client field being used for all client programs and not just the mysql cli. i believe that the mysql field in the my.cnf is all that should be needed to fix the binary problem described in #21

jeffw16 commented 1 year ago

The best way to make a backup for Canasta is to use the Restic features available in the Canasta CLI.

caused by the variables in the client field being used for all client programs and not just the mysql cli. i believe that the mysql field in the my.cnf is all that should be needed to fix the binary problem

I'm sorry, I don't understand what you mean by this.

silverhikari commented 1 year ago

tried using the Canasta CLI originally to manage Canastas but it would fail when generating them, though since it has been a while i should try it again.

the current version of my.cnf is written as:

[client]
skip-binary-as-hex = true

[mysql]
skip-binary-as-hex = true

the "[client]" field affects all programs that would run as a client to mysql servers not just the main mysql program, so programs such as mysqldump are affected, but the problem is that mysqldump does not have the option to enable or disable "skip-binary-as-hex" causing the program to fail to run with said error.

after reading the initial issue(#19 ) this seems to be a problem with the main mysql program which does have the option to enable and disable, so you would only need the option for that specific program which the field "[mysql]" already handles.

does that explain things better?

yaronkoren commented 1 year ago

@silverhikari - sorry that no one followed up on this.

Someone else just had the same problem - and, indeed, fixed it by removing the "[client]" part of my.cnf.

@vedmaka - what do you think about removing this section?