TMyDump not restoring privileges

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
GaryShelton
Posts: 5
Joined: Tue 22 Jan 2019 06:29

TMyDump not restoring privileges

Post by GaryShelton » Mon 27 Jan 2020 16:59

In testing the restore of database, if I delete user then run restore, user is added but no privileges. I have to reset them. The script includes this line:
GRANT USAGE ON *.* TO 'Vintage_Write'@'%' IDENTIFIED BY PASSWORD '*5DF2379450DE1FE82225FC5E38BEE0D9FC952776';

Not sure if it should be *.* since this user only has rights to 1 database (mariavintage).

Thanks for any help
Gary

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TMyDump not restoring privileges

Post by ViktorV » Thu 30 Jan 2020 12:01

When dumping with the doUsers option enabled, the following actions are executed:
- the list of all users is retrieved
- the SHOW GRANTS FOR query is executed for each user, and the result of the query is then added to the dump.

Post Reply