You're quite right, I think that Sam made a mistake in his screenshot -- it should be ssh.pythonanywhere.com
(or for other users who might be reading this and have accounts on our EU system, ssh.eu.pythonanywhere.com
). I've fixed that, and I'll ask him to double-check the recommendation for using the remote management stuff.
Regarding your code running inside PythonAnywhere, you don't need to use any of the stuff on that help page for that. Just for complete clarity (and I think you probably already know this, but just in case): MySQL Workbench is just the application that runs on your computer that allows you to manage remote databases. Your actual data is stored on a MySQL server inside PythonAnywhere.
So, in order to read the data that you have put into the server and edited using MySQL Workbench, you just need to connect to the MySQL server using the hostname from the "Databases" page. There's no need to set up any SSH tunneling or anything like that.
Now, regarding timeouts -- keeping a connection open uses up server resources, so if a connection is left unused for a particular amount of time (5 minutes on our servers), it is closed on the server side and you need to create a new one. My guess is that you're running into that.
There are two solutions. The quick and easy one is to always open a new connection immediately before you want to read data from it, and then to close it immediately afterwards. In a Flask app, you'd do that by opening the connection at the start of each view function that hits the DB, and then closing it after you've done your queries, ideally in the "finally" clause of a "try" block.
The alternative, which requires a little more setup but is easier and more maintainable in the long run, is to use a connection manager; Flask-SQLAlchemy is the best one for Flask. If you check out our tutorial on MySQL-backed Flask websites you'll see some useful sample code. That tutorial also includes a number of other best practices which may be of interest.