A database privilege granted by hand disappears
Privileges granted by hand to a MariaDB user created in UrbeStack disappear after the next change or rebuild. UrbeStack sets grants from its own records, so use its commands to grant privileges you want to keep.
Symptoms
A GRANT succeeds at the mariadb prompt, but SHOW GRANTS later omits the privilege. This happens the next time you change the user in UrbeStack or run urbestack-rebuild.
Cause
For each database user it manages, UrbeStack applies the grants in its records to every host for that username and revokes any other grants.
A database user you create by hand with a username outside UrbeStack's records keeps its grants. The urbestack-rebuild command lists that user in unknown_accounts.
Resolution
Set the grant through UrbeStack. This command gives the user full access to a database that belongs to the same customer.
urbestack-database-grant-set --name example_db --database example_shop --level fullUse
full,read-only, ornonefor--level, or usecustomwith a list of privileges.urbestack-database-grant-set --name example_db --database example_shop --level custom --privileges 'SELECT, INSERT'Check the grants MariaDB lists for the user on
localhost.mariadb -e "SHOW GRANTS FOR 'example_db'@'localhost'"