Link to the post displays ID instead of slug

What your explaining is the normal linking method for WordPress when you are linking to a post that has not yet been published. Based on your question I think that’s what occurred to you.

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