pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'mariadb' ([Errno -3] Temporary failure in name resolution

I’m facing the issue while Creating a site with this command

bench new-site mysite.localhost --mariadb-root-password 123 --admin-password admin --no-mariadb-socket

Note : I try to install the ERP-13 without docker
please some one help

Blockquote
Traceback (most recent call last):
File “/home/softsuave/softsuave-erp/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 787, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File “/usr/lib/python3.8/socket.py”, line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
    File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
    File "/home/softsuave/softsuave-erp/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 110, in <module>
    main()
    File "/home/softsuave/softsuave-erp/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
    click.Group(commands=commands)(prog_name="bench")
    File "/home/softsuave/softsuave-erp/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
    File "/home/softsuave/softsuave-erp/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
    File "/home/softsuave/softsuave-erp/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/home/softsuave/softsuave-erp/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/home/softsuave/softsuave-erp/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File "/home/softsuave/softsuave-erp/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
    File "/home/softsuave/softsuave-erp/frappe-bench/apps/frappe/frappe/commands/site.py", line 681, in drop_site
    _drop_site(site, db_root_username, db_root_password, archived_sites_path, force, no_backup)
    File "/home/softsuave/softsuave-erp/frappe-bench/apps/frappe/frappe/commands/site.py", line 716, in _drop_site
    drop_user_and_database(frappe.conf.db_name, db_root_username, db_root_password)
    File "/home/softsuave/softsuave-erp/frappe-bench/apps/frappe/frappe/database/__init__.py", line 33, in drop_user_and_database
    return frappe.database.mariadb.setup_db.drop_user_and_database(
    File "/home/softsuave/softsuave-erp/frappe-bench/apps/frappe/frappe/database/mariadb/setup_db.py", line 90, in drop_user_and_database
    dbman.delete_user(db_name, host="%")
    File "/home/softsuave/softsuave-erp/frappe-bench/apps/frappe/frappe/database/db_manager.py", line 31, in delete_user
    self.db.sql("DROP USER '%s'@'%s';" % (target, host))
    File "/home/softsuave/softsuave-erp/frappe-bench/apps/frappe/frappe/database/database.py", line 148, in sql
    self.connect()
    File "/home/softsuave/softsuave-erp/frappe-bench/apps/frappe/frappe/database/database.py", line 84, in connect
    self._conn = self.get_connection()
    File "/home/softsuave/softsuave-erp/frappe-bench/apps/frappe/frappe/database/mariadb/database.py", line 76, in get_connection
    conn = pymysql.connect(
    File "/home/softsuave/softsuave-erp/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line 353, in __init__
    self.connect()
    File "/home/softsuave/softsuave-erp/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 'mariadb' ([Errno -3] Temporary failure in name resolution)")

pymysql.err.OperationalError: (2003, “Can’t connect to MySQL server on ‘mariadb’ ([Errno -3] Temporary failure in name resolution)”)

make sure mariadb container is running

if it’s stopped, try restarting it

if it doesn’t restart, check logs,

reset the db or try using different Mariadb container, https://gitlab.com/-/snippets/2298024

I want set-up ERP-13 without docker, can I do that @revant_one

check this if it helps

https://frappeframework.com/docs/v13/user/en/installation

search forum for more.

Even if you tag me, I can’t help you install ERPNext manually.

1 Like