Try ERPNext Buy Support Partners Foundation

1045, Access denied for the user '***'@'localhost'

Hi,
I’m a student and I started learning ERPNext software. I followed Easy Install Script for installing frappe + bench + ERPNext for development and it successfully installed on Ubuntu 18.04.
While executing bench start command and using http://0.0.0.0:8000/ in my browser, it shows the following error,
pymysql.err.OperationalError: (1045, “Access denied for user ‘_1bd3e0294da19198’@‘localhost’ (using password: YES)”)

Can you please provide a solution and guide me for using ERPNext for development.
Thank you!

@Ananth try bench mariadb and share the output.
mariadb version?

Thanks for your reply @arokia

mariadb version,
Your MariaDB connection id is 64
Server version: 10.2.32-MariaDB-1:10.2.32+maria~bionic-log mariadb.org binary distribution

while trying bench mariadb , it shows same 1045 error.

run sudo mysql_secure_installation

Thanks again, @arokia
After executing sudo mysql_secure_installation, then I run bench start,
facing same error

sudo systemctl stop mysql
sudo mkdir –p /var/run/mysqld
sudo chown mysql:mysql /var/run/mysqld
sudo mysql –u root
FLUSH PRIVILEGES;
USE mysql;
USER ‘root’@‘localhost’ IDENTIFIED BY ‘N3w_p@ssw0rD.’;
quit
sudo systemctl start mysql

@Ananth try the above steps so that you can update the mariadb password.

@arokia
while executing the command sudo mysql -u root
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

Check status of mariadb and Run sudo systemctl start mariadb

Status of mariadb, Itself shows access denied,

try mysql -u root -p

@Ananth first check if you can authenticate using the MariaDB password in the passwords.txt file in your home directory. If you can, you don’t have to try changing your MariaDB root password again.

It’s likely that there’s an issue with your site database; specifically, the error says that the site name and password in the site_config don’t work for you. You can run bench --site site1.local --force to recreate your site.

@gavindsouza Thanks for your reply,
When I run bench --site site1.local --force, it shows
Usage: bench frappe [OPTIONS] COMMAND [ARGS]…
Try “bench frappe --help” for help.

Error: Missing command.
When I run this bench frappe --help, it shows 'frappe not installed". But Frappe is already installed.

Thank you @arokia and @gavindsouza
Now getting this new error,

I mis’typed, my bad. it’s bench new-site site1.local --force you can also append --install-app erpnext to that since you want that installed.

If you’re having a hard time getting this setup manually, perhaps you should checkout Frappe Docker or the Easy Install Script to get started. Also, start by using stable branches currently like version-12 or version-13-beta instead of develop