Frappe Bench install error on Ubuntu 14.04.3 LTS

After having no luck running the newly updated virtualbox imag, I tried I setting up a fresh install on virtualbox running on Ubuntu 14.04.3 LTS desktop.

After running the scripts below:

sudo bash --setup-production

I’m getting the error below. Can anyone help here. As i have been trying to set this up locally to test the functionality. Appreciate the help here.

Traceback (most recent call last):
File “/usr/lib/python2.7/”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/”, line 72, in _run_code
exec code in run_globals
File “/home/razr/frappe-bench/apps/frappe/frappe/utils/”, line 79, in
File “/home/razr/frappe-bench/apps/frappe/frappe/utils/”, line 16, in main
File “/home/razr/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 700, in call
return self.main(*args, **kwargs)
File “/home/razr/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 680, in main
rv = self.invoke(ctx)
File “/home/razr/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/razr/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/razr/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/razr/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 508, in invoke
return callback(*args, **kwargs)
File “/home/razr/frappe-bench/apps/frappe/frappe/”, 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/razr/frappe-bench/apps/frappe/frappe/”, 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/razr/frappe-bench/apps/frappe/frappe/”, line 31, in install_db
create_database_and_user(force, verbose)
File “/home/razr/frappe-bench/apps/frappe/frappe/”, line 49, in create_database_and_user
if force or (db_name not in dbman.get_database_list()):
File “/home/razr/frappe-bench/apps/frappe/frappe/model/”, line 435, in get_database_list
return [d[0] for d in self.db.sql(“SHOW DATABASES”)]
File “/home/razr/frappe-bench/apps/frappe/frappe/”, line 105, in sql
File “/home/razr/frappe-bench/apps/frappe/frappe/”, line 51, in connect
use_unicode=True, charset=‘utf8’)
File “/home/razr/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/”, line 81, in Connect
return Connection(*args, **kwargs)
File “/home/razr/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/”, line 193, in init
super(Connection, self).init(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1045, “Access denied for user ‘root’@‘localhost’ (using password: YES)”)

Seems mysql root password is wrong…

I had this problem today. If you use on Ubuntu 14.04, it will pull down maria and setup all the dependencies; however, the dpkg does not automatically setup a root password, so the script will fail when setting up the site because it doesn’t know the sql password.

To work around this, erase everything from the directory except for the

Next run:

sudo dpkg-reconfigure mariadb-server-core-10.0

This will give you the opportunity to set the maria root password.

Now run

sudo bash --mysql-root-password YourPasswordHere

where YourPasswordHere is the password you set with the dpkg-reconfigure command.