[ 
http://mifosforge.jira.com/browse/MIFOSBI-261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=65950#comment-65950
 ] 

johnwoodlock commented on MIFOSBI-261:
--------------------------------------

I found the best way was to create an ETL mysql user using the syntax below. 
password (following IDENTIFIED BY)can be whatever.  The user gets read-only 
access to the mifos schema and full access to the mifos datawarehouse schema.  
If the database names aren't mifos and mifos_dwh ... they can be changed to 
whatever is right for the circumstances e.g. mifos_mfi1_prod and 
mifos_mfi1_prod_dw


CREATE USER 'mifosetl'@'localhost' IDENTIFIED BY 'mifosetl';
GRANT USAGE ON *.* TO 'mifosetl'@'localhost' ;
GRANT SELECT ON `mifos`.* TO 'mifosetl'@'localhost';
GRANT ALL PRIVILEGES ON `mifos_dwh`.* TO 'mifosetl'@'localhost' WITH GRANT 
OPTION;


Then load_mifos_datawarehouse.sql in the ETL\MifosDataWarehouseETL is changed 
to use mifosetl user rather than root

I found when using CURRENT_USER it just inserts the user than you ran the 
script with as the DEFINER (i.e. may as well not use it and put mifosetl in)


Won't put this in git until I see what Sumit says (sending email) as
1. You have to remember to create the user (and add to deployment notes)
2. Will need to alter procedure for updating the ETL schema so that this user 
is always used.

> mifos bi etl job should not require (mysql) super user privileges  to run 
> --------------------------------------------------------------------------
>
>                 Key: MIFOSBI-261
>                 URL: http://mifosforge.jira.com/browse/MIFOSBI-261
>             Project: mifos business intelligence
>          Issue Type: Bug
>          Components: Data Warehouse
>            Reporter: Sumit Shah
>            Assignee: johnwoodlock
>            Priority: Critical
>             Fix For: Mifos BI 1.2 - Iteration 2, Mifos BI 1.2
>
>
> when invoking the job as a non-super user (but with ALL privs):
> see this error:
> ERROR 1227 (42000) at line 1346: Access denied; you need the SUPER privilege 
> for this operation
> when invoking this file:
> /ETL/MifosDataWarehouseETL/load_mifos_datawarehouse.sql
> line 1436 begins with:
>  /*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE 
> `SPcascade_change_to_accounts`(IN current_customer_key int, IN 
> effective_date_param date, IN new_customer_key int,
> IN new_group_key int, IN new_center_key int, IN new_loan_officer_key int, IN 
> new_branch_key int,
> i believe DEFINER should be CURRENT_USER
> there are other places in that file with similar code.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to