Best Way to Inventory the Media Library of a 200+ Multisite Installation?

You may want to check this: How do I query all posts of one type across my multisite installation?

Just change post to media and you’ll be fine.

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