Plugin generating unexpected output – on WP mysql dump import

Its not that $wpdb->query does not need $wpdb->prepare(), it’s because of not using $wpdb->prepare() in a correct manner. In your case $wpdb->prepare() never received any values which it must.

Please refer to the Codex for details about using $wpdb->prepare().

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