Rewrite of Custom Post Type doesn’t work with dynamic data

Well… I didn’t know that the expressions in the rewrite attribute of CPT must be registered in advance:

add_rewrite_tag('%baz%', '([^&/]+)');

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