I am trying to automate mysql_secure_installation script with automated response. My code is as follows :
echo \"& y y abc abc y y y y\" | ./usr/bin/mysq
When you run this command a window will pop up that will walk you through the process of securing your MySQL installation. That's it!