How allow only the uploading user access to media

Check this out, it might be helpful
I am also looking for a good solution

https://wordpress.stackexchange.com/a/400352/220907

How to hide media uploads by other users in the Media menu?

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