I am working on a script most of it works fine until it gets to line 27 of it. Which is where I have the script login to MySQL as root, create a new database and then exit MySQL.
echo "CREATE DATABASE databasename;exit;" | mysql -h localhost -u root -p --password=passwordhere
Am I calling the command correctly because it fails on this line every time and how would I fix it?
OS is Ubuntu 10.10 32 bit.
Error: ./install: line 27: mysql: command not found