Database details on localhost after migration from live site

I have copied my live WP site across to my PC using Local and Duplicator Pro to do this. Everything appears to be working well other than I’m composing a new WP page and wish to insert an image. I am unable to upload the image from my PC to the Media Library. I get this message: The server encountered an internal error or misconfiguration and was unable to complete your request.

I notice the local config.php file has retained the default details for the database. My question is should I edit config.php by entering the database details from my live site and would this make any difference to being to upload the image?