Installation issue on ubuntu 18.10

Hello ERPNEXT team,
I’m totally new in erpnext, I want to install in on ubuntu 18.10 all the steps I followed and worked properly. Steps I followed from this link https://websiteforstudents.com/install-erpnext-erp-platform-on-ubuntu-16-04-18-04-lts-with-nginx-mariadb-support/ .


At last step I’m getting one MySql Error (Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, 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 “/opt/erpnext/erpnext/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/opt/erpnext/erpnext/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/opt/erpnext/erpnext/env/local/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/opt/erpnext/erpnext/env/local/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/opt/erpnext/erpnext/env/local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/erpnext/erpnext/env/local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/erpnext/erpnext/env/local/lib/python2.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/opt/erpnext/erpnext/env/local/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/opt/erpnext/erpnext/apps/frappe/frappe/commands/site.py”, line 33, in new_site
db_type = db_type)
File “/opt/erpnext/erpnext/apps/frappe/frappe/commands/site.py”, line 66, in _new_site
source_sql=source_sql,force=force, reinstall=reinstall, db_type=db_type)
File “/opt/erpnext/erpnext/apps/frappe/frappe/installer.py”, line 36, in install_db
setup_database(force, source_sql, verbose)
File “/opt/erpnext/erpnext/apps/frappe/frappe/database/init.py”, line 16, in setup_database
return frappe.database.mariadb.setup_db.setup_database(force, source_sql, verbose)
File “/opt/erpnext/erpnext/apps/frappe/frappe/database/mariadb/setup_db.py”, line 13, in setup_database
if force or (db_name not in dbman.get_database_list()):
File “/opt/erpnext/erpnext/apps/frappe/frappe/database/db_manager.py”, line 58, in get_database_list
return [d[0] for d in self.db.sql(“SHOW DATABASES”)]
File “/opt/erpnext/erpnext/apps/frappe/frappe/database/database.py”, line 120, in sql
self.connect()
File “/opt/erpnext/erpnext/apps/frappe/frappe/database/database.py”, line 73, in connect
self._conn = self.get_connection()
File “/opt/erpnext/erpnext/apps/frappe/frappe/database/mariadb/database.py”, line 87, in get_connection
local_infile = frappe.conf.local_infile)
File “/opt/erpnext/erpnext/env/local/lib/python2.7/site-packages/pymysql/init.py”, line 94, in Connect
return Connection(*args, **kwargs)
File “/opt/erpnext/erpnext/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 327, in init
self.connect()
File “/opt/erpnext/erpnext/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 598, in connect
self._request_authentication()
File “/opt/erpnext/erpnext/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 852, in _request_authentication
auth_packet = self._read_packet()
File “/opt/erpnext/erpnext/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 683, in _read_packet
packet.check_error()
File “/opt/erpnext/erpnext/env/local/lib/python2.7/site-packages/pymysql/protocol.py”, line 220, in check_error
err.raise_mysql_exception(self._data)
File “/opt/erpnext/erpnext/env/local/lib/python2.7/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1698, u"Access denied for user ‘root’@‘localhost’"))

. If anyone can help that would be great.

Thank you

This will help, Follow this steps

  1. even the URL does not mention ubuntu 18.10. So generally (even though I couildn’t say that 1810 actually is the cause of your problems) it’s a good idea to use what is officially supported and that are the LTS versions of ubuntu. So, I’d recommend to use a 18.04 server rather then 18.10
  2. there is one step missing in that guide in my eyes and that is to remove the erpnext user from the sudo group after the installation. This is a security measure and sudo rightsd are not required to run, nor update erpnext

The quick fix is…

mysqladmin -uroot password ‘YourPasswordHERE’
mysql -uroot -pYourPasswordHERE -Bse “GRANT ALL PRIVILEGES ON . TO ‘root’@‘localhost’ IDENTIFIED BY ‘YourPasswordHERE’ WITH GRANT OPTION;”

you might also need to add the LAN/subnets etc

mysql -uroot -pYourPasswordHERE -Bse “GRANT ALL PRIVILEGES ON . TO ‘root’@‘192.168.%.%’ IDENTIFIED BY ‘YourPasswordHERE’ WITH GRANT OPTION;”

mysql -uroot -pYourPasswordHERE -Bse “GRANT ALL PRIVILEGES ON . TO ‘root’@‘127.%.%.%’ IDENTIFIED BY ‘YourPasswordHERE’ WITH GRANT OPTION;”

If you have a MariaDB root password then you could use it on the command line during the install or perhaps add it to /root/.my.cnf to get past this.

If you don’t have one it might be because you are using a socket for root authentication, if this is the case you have to set one (I haven’t found a way to avoid this, but perhaps it is possible), see this article:

thank you for your reply I even tried it on 18.04 then also getting the same error.

The solution provided by @trentmu will solve your issue.

Thank you for your response and it worked

Thank you for your response and it worked but in 18.04 Ubuntu

can u mark the post which solved your issue as solution please?