How to get the full stack trace for WordPress “table doesn’t exist” error in debug.log?

You are not seeing a stack trace because this information is being logged via the error_log() function within the wpdb::print_error() method. error_log() simply sends a message to the logs.

The behaviour you’re expecting with a full stack trace would require trigger_error() to be used.

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