Error on installation

omer@omer-Inspiron-3521:~$ wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
–2015-11-29 11:54:27-- https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 23.235.43.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|23.235.43.133|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 13790 (13K) [text/plain]
Saving to: ‘setup_frappe.sh’

100%[======================================================================================================>] 13,790 --.-K/s in 0s

2015-11-29 11:54:29 (230 MB/s) - ‘setup_frappe.sh’ saved [13790/13790]

omer@omer-Inspiron-3521:~$ sudo bash setup_frappe.sh --setup-production
[sudo] password for omer:
Sorry, try again.
[sudo] password for omer:
Installing for Ubuntu trusty amd64
In case you encounter an error, you can post on https://discuss.frappe.io

Adding ubuntu mariadb repo
Installing packages for Ubuntu. This might take time…
Installing wkhtmltopdf

  • Stopping MariaDB database server mysqld [ OK ]
  • Starting MariaDB database server mysqld [ OK ]
  • Checking for corrupt, not cleanly closed and upgrade needing tables.
    Adding frappe user
    Installing frappe-bench
    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/omer/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
    main()
    File “/home/omer/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/omer/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
    return self.main(*args, **kwargs)
    File “/home/omer/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
    rv = self.invoke(ctx)
    File “/home/omer/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/omer/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/omer/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/omer/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
    return callback(*args, **kwargs)
    File “/home/omer/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/omer/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/omer/frappe-bench/apps/frappe/frappe/installer.py”, line 31, in install_db
    create_database_and_user(force, verbose)
    File “/home/omer/frappe-bench/apps/frappe/frappe/installer.py”, line 49, in create_database_and_user
    if force or (db_name not in dbman.get_database_list()):
    File “/home/omer/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 501, in get_database_list
    return [d[0] for d in self.db.sql(“SHOW DATABASES”)]
    File “/home/omer/frappe-bench/apps/frappe/frappe/database.py”, line 105, in sql
    self.connect()
    File “/home/omer/frappe-bench/apps/frappe/frappe/database.py”, line 51, in connect
    use_unicode=True, charset=‘utf8’)
    File “/home/omer/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/init.py”, line 81, in Connect
    return Connection(*args, **kwargs)
    File “/home/omer/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)”)

This is a mysql password problem:

mysqlexceptions.OperationalError: (1045, “Access denied for user ‘root’@‘localhost’ (using password: YES)”)

You have to specify the root password for your mysql access using the option --mysql-root-password of setup_frappe.sh.
Something like:

sudo bash setup_frappe.sh --setup-production --mysql-root-password=mysecretpassword
2 Likes

Thanks for the reply,
I might seem a lot dum, but please bear with me. I did what you said but and i got the following results

omer@omer-Inspiron-3521:~$ sudo bash setup_frappe.sh --setup-production --mysql-root-password=erpnext
[sudo] password for omer:
Installing for Ubuntu trusty amd64
In case you encounter an error, you can post on https://discuss.frappe.io

Adding ubuntu mariadb repo
Installing packages for Ubuntu. This might take time…
Installing wkhtmltopdf

  • Stopping MariaDB database server mysqld [ OK ]
  • Starting MariaDB database server mysqld [ OK ]
  • Checking for corrupt, not cleanly closed and upgrade needing tables.
    Adding frappe user
    fatal: destination path ‘bench-repo’ already exists and is not an empty directory.

As it failed the first time you are now in a “non-clean” situation:

  • If this is a virtual machine and you feel yourself uncomfortable with all of this, I suggest to start again with a “fresh/new” virtual machine.

  • If you want to continue on this path with the same machine, you could try to remove the bench-repo directory: sudo rm -rf /home/frappe/bench-repo before retrying setup_frappe.sh.

2 Likes

Thanks again for your input.
Actually I am from accounting background and is implementing it in an organisation.
I have dedicated a Ubuntu System for it and i am not using a virtual machine.
I did first tried it on virtual machine and everything worked smooth for me. I am in a fix, to either continue it on virtual machine or keep trying it on installing on Ubuntu.
Can I migrate the whole data from virtual machine to a real machine (Ubuntu) later on, and is the virtual machine reliable enough to continue using it for production instance.

And by the way I am still stuck :confused:

Did you try this:

before doing again your:

$ sudo bash setup_frappe.sh --setup-production --mysql-root-password=erpnext

Yes I did

@Syed_Omer_Abbas You need to describe how it failed then, otherwise we can’t help you. :see_no_evil:

1 Like

I am having the same problem and I did follow what @NoumirPoutipou said
removed the bench-repo folder by using command
sudo rm -rf benc-repo
also I did mentioned the mysql password in the command but got the same error again.

Regards
Ruchin Sharma