Why does using different URLs in WordPress settings cause a “Publishing failed, you are offline” error?

Why does using different URLs in WordPress settings cause a “Publishing failed, you are offline” error?

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