[MDEV-28703] Unable to dump database with FUNCTION Created: 2022-05-31  Updated: 2022-05-31

Status: Open
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.4.24
Fix Version/s: None

Type: Bug Priority: Major
Reporter: George Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Rocky Linux release 8.5
4.18.0-305.17.1.el8_4.x86_64 #1



 Description   

If we have a database with FUNCTION/STORED PROCEDURE there is no way to dump it except if we do it as root(user with full privileges) or the definer of the function/procedure.
And there is no way we can create a user that have full access (including functions and procedures) to a limited set of databases.

mysqldump: user has insufficient privileges to SHOW CREATE FUNCTION `Function_name`!

There should be an option to create like master user which have access to number of databases and have full access to them so it can delete, view, dump, edit etc.
Otherwise we are forced to do backups and maintenance on client databases with root user.



 Comments   
Comment by Daniel Black [ 2022-05-31 ]

From memory, GRANT SELECT ON mysql.func TO backupuser (and other system tables like proc and event) might be enough to dump them.

Comment by George [ 2022-05-31 ]

So this user should be only for backup because it will have access to all functions on the server? I ask for a user, like main user in cpanel, which have access on all the databases for the account.

Generated at Thu Feb 08 10:02:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.