Error establishing a database connection & Only root or sudo user can run this EasyEngine

Hi,

I am new to everything Nginx,Amazon EC2, Wordpress I hardly figured out to setup Wordpress on Nginx its was working fine. But while surfing dashboard or website

All of sudden it gives Error establishing a database connection I have setuped WP & Nginx on AWS t1.micro (Free Tier)

One old trick i used to get it back working was just restarting mysql , php, nginx through SSH

But SSH is now giving me “Only root or sudo user can run this EasyEngine” I have messed up with permissions I think…

Can anyone help me, I will be thankfull for your support.