Just to confirm, you're trying to upload an SQL source file to your PythonAnywhere file space? Or you've already got a file there and you're using the mysql client to run that script to populate your database? Depending which issue you're having the possible causes are quite different.
That error message looks a bit like the one that appears in web browsers in Windows when a TCP connection is reset, and if that's the case it would probably be helpful to know whether the error appears straight away or after a longer period (and whether that period is 10s of seconds, a few minutes, etc.).
There are many causes of connection resets, anything from idle timeouts to a misconfigured MTU, so it's important to r and narrow down what you're doing to provoke the error.