I tried to install ERPNext multiple times with the link you provided. Sometimes it failed and sometimes it worked.
This time I tried installing it in WSL in windows 10. It got all running until I got this error.
When I run bench start and then refresh the page, I get this error in browser:
pymysql.err.OperationalError
pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' ([Errno 111] Connection refused)")
## Traceback *(most recent call last)*
* #### File "/home/anupd/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line *613*, in `connect`
sock = socket.create_connection(
* #### File "/usr/lib/python3.8/socket.py", line *808*, in `create_connection`
raise err
* #### File "/usr/lib/python3.8/socket.py", line *796*, in `create_connection`
sock.connect(sa)
* During handling of the above exception, another exception occurred:
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/app.py", line *55*, in `application`
init_request(request)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/app.py", line *130*, in `init_request`
frappe.local.http_request = frappe.auth.HTTPRequest()
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/auth.py", line *37*, in `__init__`
self.set_session()
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/auth.py", line *74*, in `set_session`
frappe.local.login_manager = LoginManager()
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/auth.py", line *130*, in `__init__`
self.make_session(resume=True)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/auth.py", line *215*, in `make_session`
frappe.local.session_obj = Session(
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/sessions.py", line *215*, in `__init__`
self.resume()
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/sessions.py", line *287*, in `resume`
validate_ip_address(self.user)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/auth.py", line *419*, in `validate_ip_address`
frappe.get_cached_doc("User", user) if not frappe.flags.in_test else frappe.get_doc("User", user)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/__init__.py", line *1020*, in `get_cached_doc`
doc = get_doc(*args, **kwargs)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/__init__.py", line *1074*, in `get_doc`
doc = frappe.model.document.get_doc(*args, **kwargs)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/model/document.py", line *77*, in `get_doc`
controller = get_controller(doctype)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/model/base_document.py", line *78*, in `get_controller`
return _get_controller()
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/model/base_document.py", line *43*, in `_get_controller`
module_name, custom = frappe.db.get_value(
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/database/database.py", line *459*, in `get_value`
ret = self.get_values(
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/database/database.py", line *531*, in `get_values`
out = self._get_values_from_table(
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/database/database.py", line *726*, in `_get_values_from_table`
r = self.sql(
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/database/database.py", line *148*, in `sql`
self.connect()
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/database/database.py", line *84*, in `connect`
self._conn = self.get_connection()
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/database/mariadb/database.py", line *76*, in `get_connection`
conn = pymysql.connect(
* #### File "/home/anupd/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line *353*, in `__init__`
self.connect()
* #### File "/home/anupd/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line *664*, in `connect`
raise exc
* During handling of the above exception, another exception occurred:
* #### File "/home/anupd/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line *613*, in `connect`
sock = socket.create_connection(
* #### File "/usr/lib/python3.8/socket.py", line *808*, in `create_connection`
raise err
* #### File "/usr/lib/python3.8/socket.py", line *796*, in `create_connection`
sock.connect(sa)
* During handling of the above exception, another exception occurred:
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/middlewares.py", line *18*, in `__call__`
return super(StaticDataMiddleware, self).__call__(environ, start_response)
* #### File "/home/anupd/frappe-bench/env/lib/python3.8/site-packages/werkzeug/middleware/shared_data.py", line *220*, in `__call__`
return self.app(environ, start_response)
* #### File "/home/anupd/frappe-bench/env/lib/python3.8/site-packages/werkzeug/middleware/shared_data.py", line *220*, in `__call__`
return self.app(environ, start_response)
* #### File "/home/anupd/frappe-bench/env/lib/python3.8/site-packages/werkzeug/local.py", line *231*, in `application`
return ClosingIterator(app(environ, start_response), self.cleanup)
* #### File "/home/anupd/frappe-bench/env/lib/python3.8/site-packages/werkzeug/wrappers/base_request.py", line *237*, in `application`
resp = f(*args[:-2] + (request,))
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/app.py", line *90*, in `application`
response = handle_exception(e)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/app.py", line *290*, in `handle_exception`
response = frappe.website.render.render("message", http_status_code=http_status_code)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/website/render.py", line *45*, in `render`
raise_if_disabled(path)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/website/render.py", line *413*, in `raise_if_disabled`
routes = frappe.db.get_all(
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/database/database.py", line *633*, in `get_all`
return frappe.get_all(*args, **kwargs)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/__init__.py", line *1741*, in `get_all`
return get_list(doctype, *args, **kwargs)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/__init__.py", line *1713*, in `get_list`
return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/model/db_query.py", line *164*, in `execute`
self.columns = self.get_table_columns()
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/model/db_query.py", line *429*, in `get_table_columns`
return get_table_columns(self.doctype)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/model/meta.py", line *63*, in `get_table_columns`
return frappe.db.get_table_columns(doctype)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/database/database.py", line *1081*, in `get_table_columns`
columns = self.get_db_table_columns("tab" + doctype)
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/database/database.py", line *1065*, in `get_db_table_columns`
for r in self.sql(
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/database/database.py", line *148*, in `sql`
self.connect()
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/database/database.py", line *84*, in `connect`
self._conn = self.get_connection()
* #### File "/home/anupd/frappe-bench/apps/frappe/frappe/database/mariadb/database.py", line *76*, in `get_connection`
conn = pymysql.connect(
* #### File "/home/anupd/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line *353*, in `__init__`
self.connect()
* #### File "/home/anupd/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line *664*, in `connect`
raise exc
> pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' ([Errno 111] Connection refused)")
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.
You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:
* `dump()` shows all variables in the frame
* `dump(obj)` dumps all that's known about the object
Brought to you by **DON'T PANIC**, your friendly Werkzeug powered traceback interpreter.