Based on the information provided the script you configured is trying to connect to IP address 127.0.0.1 which maps to the localhost host name (localhost - Wikipedia) which would mean that the Auth0 server running the script would try to connect to a database located within the Auth0 server itself (which does not exists).
The default scripts use the localhost host as a placeholder that you need to replace with an host that can be resolved publicly (it should also be possible to specify an IP address directly), more specifically the machine hosting your MySQL database needs to be reachable from the Internet.