Custom permalink for specific category

I got an answer on the WordPress forums. Here is the working code for those looking to do something similar:

add_filter( 'post_type_link', 'change_webinar_links', 10, 2 );
function change_webinar_links( $link, $post) {
if ( $post->post_type == 'tribe_events' && tribe_event_in_category('webinar') ) {
$link = trailingslashit( home_url('/webinars/' . $post->post_name ) );
}
return $link;
}
add_action( 'init', 'webinar_rewrite_rule', 5);
function webinar_rewrite_rule() {
add_rewrite_rule( '^webinars/([^/]+)', 'index.php?tribe_events=$matches[1]&post_type=tribe_events&name=$matches[1]', 'top' );
}

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