WordPress rewrite_rules_array rule not working properly

things are working by using rewrite_rules_array filter
1 :- i want to know the difference between add_rewrite_url() and rewrite_rules_array filter
also i want to add array of rules in rewrite_rules_array filter but currently its not working only one of the rule is working others are not
thanks

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)