https://bugzilla.wikimedia.org/show_bug.cgi?id=46460

--- Comment #1 from Jan Luca <[email protected]> ---
Created attachment 11995
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=11995&action=edit
MySQL/MariaDB-procedure to create tools dbs

The attachment creates two procedures for creating tools db:
"sys.create_tools_db" and "sys.create_tools_db_no_output".

The procedures run with the rights of the definer (SQL SECURITY DEFINER), so
the users do not need a global CREATE DATABASE right.

They test the dbname that should be created if it has a syntax like
<toolname>_<dbname>. When the name pass this test, the database will be created
and the tooluser gets all rights with grant option for the new database.

sys.create_tools_db outputs the result of the process (this should be used by
users on the MySQL-Shell), sys.create_tools_db_no_output generates no output
(for use in programs)

The attachment is made for copy-and-paste on the MySQL-Shell.

The users need only the execute right for sys.* (GRANT EXECUTE ON sys.* TO
<user>) to call this the procedure. See also the other attachment.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to