ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)

Hello everyone,

I just downloaded Ubuntu 22.04, from MS Store, and then open the terminal tried to install erpnext, when i reach to the mysql step I’m getting this error while installing mysql.

ERROR 2002 (HY000): Can’t connect to local server through socket ‘/run/mysqld/mysqld.sock’ (2)

Please help, Thanks

here is the updated error.

frappe@Rahul-PC:~$ bench init --frappe-branch version-14 frappe-bench
Setting Up Environment
$ python3 -m venv env
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet wheel
/bin/sh: 1: redis-server: not found
Traceback (most recent call last):
File “/usr/local/lib/python3.10/dist-packages/bench/commands/make.py”, line 75, in init
init(
File “/usr/local/lib/python3.10/dist-packages/bench/utils/render.py”, line 105, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/system.py”, line 70, in init
bench.setup.config(
File “/usr/local/lib/python3.10/dist-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/bench.py”, line 384, in config
generate_config(self.bench.name)
File “/usr/local/lib/python3.10/dist-packages/bench/config/redis.py”, line 15, in generate_config
redis_version = get_redis_version()
File “/usr/local/lib/python3.10/dist-packages/bench/config/redis.py”, line 73, in get_redis_version
version_string = subprocess.check_output(“redis-server --version”, shell=True)
File “/usr/lib/python3.10/subprocess.py”, line 421, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/usr/lib/python3.10/subprocess.py”, line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘redis-server --version’ returned non-zero exit status 127.

ERROR: There was a problem while creating frappe-bench