MySQL Forums :: Newbie :: Create database in batch file


Advanced Search

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


Subject Written By Posted
Create database in batch file urby coz 06/30/2010 03:09AM
Re: Create database in batch file laptop alias 06/30/2010 04:53AM
Re: Create database in batch file urby coz 06/30/2010 08:05AM
Re: Create database in batch file laptop alias 06/30/2010 08:28AM
Re: Create database in batch file Barry Galbraith 07/01/2010 01:22AM
Re: Create database in batch file urby coz 07/01/2010 01:44AM
Re: Create database in batch file Barry Galbraith 07/01/2010 01:50AM
Re: Create database in batch file urby coz 07/02/2010 05:23AM


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.