set /p db="Enter Search Database Name : "
cd C:\Database
mysql -u root -p -e ‘create database %db%’
This is something so simple and I have read multiple "How To" but nothing seems to want to cooperate.
This is part of a batch file where I am trying to create an empty MySQL database in the "c:\database" folder.
I have tried several different versions of the statement but each seems to have something not quite right.
on this system, root (the user) has no password and I can login using PHPMyAdmin and create this same DB with no problem using root and no password to get in.
The more I change the script from simple the worse the errors get but it never creates that DB.
> 4WD , as you already pointed out, I did have to go through this before but the circumstances apparently were different enough that the same statement from that script wont work either. It has to be something from the way I am trying to use a batch file to run a MySQL command?>