How do I determine if a category exists by ID?

There is category_exists() function, but it seems to be for internal use in admin so you can try term_exists() instead.

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