Isolating images in uploads not used/recognised by WordPress

It would be easier to use a plugin for this. I’ve been using this one for similar task https://wordpress.org/plugins/media-cleaner/. It missed some files, but removed majority of the “orphaned” images though.

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