grant select on myDB.* to 'bi'@'myhost.example.com'
Javlja se potreba da "bi" user izvrsava stored procedure koje treba da kreiraju/drop-uju temporary tabele, preciznije:
- kreira nekoliko temp tabela na bazi select-a
- kreira finalni query (select)
- drop-uje temp tabele
MySQL dokumentacija kaze:
Citat:
The CREATE TEMPORARY TABLES privilege enables the creation of temporary tables using the CREATE TEMPORARY TABLE statement.
However, other operations on a temporary table, such as INSERT, UPDATE, or SELECT, require additional privileges for those operations for the database containing the temporary table, or for the nontemporary table of the same name.
To keep privileges for temporary and nontemporary tables separate, a common workaround for this situation is to create a database dedicated to the use of temporary tables. Then for that database, a user can be granted the CREATE TEMPORARY TABLES privilege, along with any other privileges required for temporary table operations done by that user.
However, other operations on a temporary table, such as INSERT, UPDATE, or SELECT, require additional privileges for those operations for the database containing the temporary table, or for the nontemporary table of the same name.
To keep privileges for temporary and nontemporary tables separate, a common workaround for this situation is to create a database dedicated to the use of temporary tables. Then for that database, a user can be granted the CREATE TEMPORARY TABLES privilege, along with any other privileges required for temporary table operations done by that user.
1. Kakvi su vasi saveti/iskustva?
2. Da li kreiranje dodatne baze za potrebe temporary tabela za potrebe reportova ima nekih drugih mana?
3. Da li se gore pomenuti scenario moze podesiti na jednoj bazi ali tako da permisije tipa insert, update, delete, drop vaze samo za temporary tabele?
U pitanju je mysql-5.1.69 na RHEL 6.4
Unapred hvala,
Igor