I have this following script which works fine on ubuntu for starting and creating a new table for MySQL database: echo CREATE DATABASE database_name | mysql -u root -pAfter this command is executed MySQL asks for password.The only problem is that I want to do this on vagrant provision bash script, so I have to automate the process of entering the password. I basically have to give a single line of input to the MySQL program like this:Enter password: password_goes_hereHow do I combine the process of entering the database creation command and the password as text to the program?
How to automatically feed two arguments to program after startup?
bash;shell script;ubuntu;mysql;vagrant