WordPress cron creation during plugin installation results with initial execution

strtotime( 'midnight' ) will give you midnight for today, which has already happened! You want midnight for tomorrow.

e.g. date( 'F jS H:i:s', strtotime( 'midnight' ) ) on July 19th is July 19th 00:00:00

However, date( 'F jS H:i:s', strtotime( 'tomorrow midnight' ) ) would be July 20th 00:00:00

…which is what you want! So just use tomorrow midnight instead.

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