Author Topic: Unable to perform config backup:Error: mysqldump: couldn't execute FLUSH TABLES  (Read 647 times)

fcortes

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Hi guys
I'm on version 7
I was trying to do a backup of recent config changes but I get an error pretty much indicating something like

'...mysqldump: couldn't execute 'FLUSH TABLES': Access Denied, you need at least the RELOAD or FLUSH_TABLES priviledge(s) for this operation... Exit Value 2'

I found this article https://mysqldump.guru/mysqldump-couldnt-execute-flush-tables-access-denied.html that seems to point out the problem and solution, but I'm unsure how to do this from the command line as I don't want to break anything.

any guidance on what command will take care of this will be greatly appreciated.

Cheers.

turalyon

  • Zen Warrior
  • ***
  • Posts: 195
  • Karma: +15/-0
    • View Profile
I got that errors last week for Sogo database and I was able to fix it by running the following commands:

Code: [Select]
mysql -u root -p$(sudo cat /var/lib/zentyal/conf/zentyal-mysql.passwd)

GRANT RELOAD,PROCESS ON *.* TO 'sogo'@'127.0.0.1';
FLUSH PRIVILEGES;
EXIT;

--

“This world is ours, and by the Holy Light we will keep it safe, now and forever".

fcortes

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Hi @turalyon
I appreciate your reply
I'm confused about the "Sogo Database" you mentioned.. I figure that is not the name of the zentyal database, or is it?
is there something else other than 'sogo' I should be using or somehow that is what I need to use?

if the question is dumb, my apologies. newbie here on what constitutes the 'insides' of zentyal

thank you

turalyon

  • Zen Warrior
  • ***
  • Posts: 195
  • Karma: +15/-0
    • View Profile
Hi,

The message from the log you posted is not complete but I imagined that the database that could not be backed up is Sogo (same error as in my environment).

Basically, Zentyal creates two databases in Mysql:

1. 'zentyal', which is created by the zentyal-core package.
2. 'sogo', which is created by the Webmail module.

As far as I know, this issue only affects the webmail database.

--

“This world is ours, and by the Holy Light we will keep it safe, now and forever".

chapderprinz

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Thank you for your solution, turalyon. It worked perfectly.

Yes, the affected database was the sogo one. One annotation: I had to put "sudo" in front of the mysql command
(sudo mysql -u root -p$(sudo cat /var/lib/zentyal/conf/zentyal-mysql.passwd)). Otherwise it ended in an access violation errormessage for root...

Greets from the baltic sea
Charles

Ret

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +1/-0
    • View Profile
Thank you turalyon and chapderprinz! I had the same configuration backup error and both of your suggestions helped me!

Zentyal team, please fix this