I am trying to create a batch file to create a new user and then assign permissions to the new user. I want to do something like this:
c:\mysql\bin\mysql -uroot -ppassword < CREATE USER 'username_here'@'localhost' IDENTIFIED BY 'password_here';
c:\mysql\bin\mysql -uroot -ppassword < GRANT ALL ON myDB.* TO 'username_here'@'localhost';
Problem is I get an error saying the System can not find the file specified. I know I am calling the mysql exe from the right place because if I just do:
c:\mysql\bin\mysql -uroot -ppassword
it logs in and gives me the mysql prompt. Am I doing something wrong?