Help adding custom url, rewrite_rules_array

For anyone looking, the solution was:

add_action('init', function() {

     add_rewrite_rule(
        'product/(.*)/(.*)/?',
        'index.php?product=$matches[1]&view=$matches[2]',
        'top'
    );

});

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