Permalink Trouble with custom post types

Do not use flush_rewrite_rules() on every init, use it in your plugin’s activation hook once (example).

Side note: __('New Video') is broken. Without the second parameter textdomain this text is not translatable. Use __( 'New Video', 'your_plugin_textdomain' ) instead.

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