Error when installing erpnext on fresh ubuntu 16.04 via script

I use a fresh vps with ubuntu 16.04 freshly installed.
I get this error, when using this script: python install.py --develop --user frappe
but the script continues, until it says “Frappe/ERPNext has been successfully installed!”

but why this error?

TASK [Set root Password] *******************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“mysqladmin”, “-u”, “root”, “password”, “RecXXXX-001”], “delta”: “0:00:00.003848”, “end”: “2017-01-28 09:27:07.553269”, “failed”: true, “rc”: 1, “start”: “2017-01-28 09:27:07.549421”, “stderr”: “\u0007mysqladmin: connect to server at ‘localhost’ failed\nerror: ‘Access denied for user ‘root’@‘localhost’ (using password: NO)’”, “stdout”: “”, “stdout_lines”: [], “warnings”: []}
…ignoring

Seems to be you are entering wrong mysql root password while installtion.
Before starting installation, please verify your mysql root password.
execute mysql -u root -p on your terminal and enter your root password, it should redirect you to MariaDB console if your password is correct, otherwise you’ve to reset the root password.

I didn’t have mysql on my system. I used a clean ubuntu 1604 install.
this seems to be a bug,
see here: How do I uninstall erpnext my server?
any ideas how to resolve?

Seems the issue with mysql root password.

you can reset mysql root password via https://ubuntu.flowconsult.at/en/mysql-set-change-reset-root-password/

Thanks @saurabh6790, I followed the instructions in the link,
Then I restarted the script
It gives now this error:

TASK [restart mysql linux] *****************************************************

fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Job fo r mariadb.service failed because the control process exited with error code. See “systemctl status mariadb.service” and “journalctl -xe” for details.\n”}
to retry, use: --limit @develop/install.retry

PLAY RECAP *********************************************************************
localhost : ok=22 changed=2 unreachable=0 failed=1

Traceback (most recent call last):
File “install.py”, line 351, in
install_bench(args)
File “install.py”, line 108, in install_bench
run_playbook(‘develop/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 301, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘dev elop/install.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=fra ppe’]’ returned non-zero exit status 2
root:~ #

I think this is a bug n the developer install script
the production install script works fine.
maybe the script should test if there is a mysql, and then handle those cases appropriately

hi @pee

Instructions to change the root password for Mysql/Maria-DB:

1.) Stop MySQL service using sudo service mysql stop
2.) Then execute sudo mysqld_safe --skip-grant-table & command to start the mysql in safe mode and [Hit Enter]
3.) After hitting enter execute mysql -u root command. [You don’t need to enter any password here]
4.) New MariaDB console will be open.
5.) On MariaDB Console execute use mysql and hit enter.
6.) Now you can change the root password using UPDATE user SET password=PASSWORD() WHERE user=‘root’; and hit enter.
7.) Exit from MariaDB console using exit command.

8.) Now stop the mysqld_safe service by killing mysqld_safe service using process id.
9.) Ensure you PID of mysqld_safe by executing ps -aux | grep mysqld_safe command.

10.) Again restart your mysql server using sudo service mysql restart


To Verify use mysql -u root -p. if you redirect to mysql/MariaDB console then congrats you’ve changed the password successfully.

NOTE:
You have to stop the mysql_safe service for Installing ERPNext on your system.
If Your System still throwing the same error while installation then try to reinstall Mysql/MariaDB.

NavdeepGhai