I am new to ERPNext. I have tried to reinstall frappe-bench and erpnext several times in both production and developer mode, but I am getting this error all the time. Can you please help me in letting me know where I am going wrong.

Setting up first site
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/umag/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
File “/home/umag/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
File “/home/umag/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/umag/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/umag/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/umag/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/umag/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/umag/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/umag/frappe-bench/apps/frappe/frappe/commands.py”, line 69, in new_site
_new_site(db_name, site, mariadb_root_username=mariadb_root_username, mariadb_root_password=mariadb_root_password, admin_password=admin_password, verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
File “/home/umag/frappe-bench/apps/frappe/frappe/commands.py”, line 87, in _new_site
install_db(root_login=mariadb_root_username, root_password=mariadb_root_password, db_name=db_name, admin_password=admin_password, verbose=verbose, source_sql=source_sql,force=force, reinstall=reinstall)
File “/home/umag/frappe-bench/apps/frappe/frappe/installer.py”, line 32, in install_db
create_database_and_user(force, verbose)
File “/home/umag/frappe-bench/apps/frappe/frappe/installer.py”, line 50, in create_database_and_user
if force or (db_name not in dbman.get_database_list()):
File “/home/umag/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 526, in get_database_list
return [d[0] for d in self.db.sql(“SHOW DATABASES”)]
File “/home/umag/frappe-bench/apps/frappe/frappe/database.py”, line 106, in sql
File “/home/umag/frappe-bench/apps/frappe/frappe/database.py”, line 52, in connect
use_unicode=True, charset=‘utf8’)
File “/home/umag/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/init.py”, line 81, in Connect
return Connection(*args, **kwargs)
File “/home/umag/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 193, in init
super(Connection, self).init(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1045, “Access denied for user ‘root’@‘localhost’ (using password: YES)”)

It seems mysql root password is wrong.

You can find mysql password in frappe_passwords.txt under home directory.

also, you can reset root password by https://www.howtoforge.com/setting-changing-resetting-mysql-root-passwords

Hi Saurabh,
Thanks a ton for replying back so
promptly. When I tried the steps to recover MySQL root password, I am
getting stuck up at stopping MySQL server. It is giving an error:cat: /var/run/mysqld/mysqld.pid: permission denied.
Due to so many re-installations, the password has got a mismatch, i think.Can you please help?

use sudo before executing command,
eg: sudo /etc/init.d/mysql stop

Thanks Saurabh. I was able to change the root password and start the mysql.
Now, I am stuck up at another point.

After issuing these following commands on terminal:
$ bench use library
$ bench start

I was just trying to follow the tutorials and have installed library and library_management
When, I checked out localhost:8000 on the browser, I am getting these following errors:


OperationalError: (1045, “Access denied for user ‘00299a408d’@‘localhost’ (using password: YES)”)

Can you please help me with this also? Thanks a lot for all your support

Thanks Saurabh. I figured out the problem and it is working fine now… Many thanks for all your help. :slight_smile:

@uma13 Can you please share how you solved it.

I did not realize that I was creating multiple benches without assigning different ports. So, I deleted both the benches and installed a bench afresh and did the app update. It worked. :slight_smile:

1 Like