ReWrite rule for files of a previously standalone blog moved to network

OK, I’ve found it by testing all of the combinations, I could imagine:

RewriteCond %{HTTP_HOST} ^(.*)domain\.com
RewriteRule ^wp-content/uploads/(.*)$ wp-content/blogs\.dir/3/files/$1 [L]

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