I always get this error with easy install

After secular battles, we’ve just managed to install v12 on Ubuntu 18.04 so we followed the flow from here: Fool proof install - step by step - #19 by loftwah

And then we fixed a few things:

permission error
SUDO chown -cR erpnext:erpnext /home/erpnext/.cache
find . -type f -exec SUDO chmod 0644 {} \;
# correct folder permissions
find . -type d -exec chmod 0755 {} \;permission error
SUDO chown -cR erpnext:erpnext /home/erpnext/.cache
find . -type f -exec SUDO chmod 0644 {} \;
# correct folder permissions
find . -type d -exec chmod 0755 {} \;

database cannot connect error

sudo service mysql restart

Login to Mysql & follow the command

mysql -u root

use mysql

select * from mysql where user = 'root'; - Look at the top to determine whether the password column is called password or authentication_string

UPDATE mysql.user set password_field from above = PASSWORD('your_new_password') where user = 'root' and host = 'localhost'; - Use the proper password column from above

SELECT User, Host, plugin FROM user;

If Plugin is not mysql_native_password, then set the plugin by the below command

UPDATE user SET plugin='mysql_native_password', password=PASSWORD('XXX') WHERE User='root';
FLUSH PRIVILEGES;
exit;database cannot connect error

sudo service mysql restart

Login to Mysql & follow the command

mysql -u root

use mysql

select * from mysql where user = 'root'; - Look at the top to determine whether the password column is called password or authentication_string

UPDATE mysql.user set password_field from above = PASSWORD('your_new_password') where user = 'root' and host = 'localhost'; - Use the proper password column from above

SELECT User, Host, plugin FROM user;

If Plugin is not mysql_native_password, then set the plugin by the below command

UPDATE user SET plugin='mysql_native_password', password=PASSWORD('XXX') WHERE User='root';
FLUSH PRIVILEGES;
exit;

redis connection refused error

bench setup production erpnextredis connection refused error
bench setup production erpnext

Kudos to @szufisher for the amazing job and dedication!