Random item on Custom Query working Local but not on live

My guess is that your results are cached on the production environment.

Try bypassing cache by adding this to your query args:

'cache_results'  => false,

See https://developer.wordpress.org/reference/classes/wp_query/#caching-parameters

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