Pagination reloads first page but has proper url

Turns out this line of code I had right above the rest to exclude a specific category from the homepage loop is what caused the issue:

    <?php if (is_home()) {
      WP_Query("cat=-4")
    ;} ?>

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