Hello @kartik,
Try:
cat filename.sql | mysql -u username -p # type mysql password when asked for it
Where filename.sql holds all the sql to create your database.
Or
echo "create database `database-name`" | mysql -u username -p
If you really only want to create a database.
Hope it helps!!
Thank you!!