echo"create database logstash; grant all privileges on logstash.* to 'logstash'@'localhost' identified by 'logstash'; flush privileges;"| sudo -u root mysql
echo"create user logstash PASSWORD 'logstash'; create database logstash; grant all privileges on database logstash to logstash;"| sudo -u postgres psql