MySQL Forums
Forum List  »  Newbie

Create database in batch file
Posted by: urby coz
Date: June 30, 2010 03:09AM

I am trying to create a new mysql database called "MyNewDatabase".

I can get it to work in the command prompt by entering:
mysqladmin -u root -p CREATE MyNewDatabase
and then pressing return at the "enter password" prompt (since I have no password).

Is there a way I could automate this in a batch file, passing the password in so that the "enter password" prompt never appears?

Options: ReplyQuote

Written By
Create database in batch file
June 30, 2010 03:09AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.