Hints, Tips and Installation

Back to -Tutorials -Ruby In Steel Tutorials -Archives -Hints, Tips and Installation

Ruby On Rails and MySQL - faster with a Visual Studio shortcut

How to add MySQL as an External Tool

When starting a Ruby On Rails application, the first step is often the creation of a database. If you use MySQL you may be in the habit of navigating around on disk and running commands from system prompts in order to do this. In fact, you can create a MySQL database with ever leaving Visual Studio. All you need to do is add a MySQL Admin item to the Visual Studio Tools menu. This is how to do it...

- Select Tools, External Tools
- In the External Tools dialog, click Add
- Enter the details shown in the screenshot below in the Title, Command and Arguments fields (here I assume that there is no password and ‘root’ is your user name; if not change it as appropriate). Enter the path to the directory containing mysqladmin.exe in the Initial Directory field.
- Check off the ‘Prompt for arguments’ option.
- Click OK.

Note: If you have set a password for use with MySQL, you must add this to the argument list after -p; there must be no spaces between -p and the password. So, if your password were xyz, the complete list of arguments which you would need to supply would be:
-u root -pxyz

Now when you want to create a MySQL database, just select MySQL Admin from the Tools menu.

This pops up a dialog which displays your specified arguments: -u root

Edit this by entering create followed by the name of the database you wish to create (such as, say, ‘railsblog_development’).

This is what you should now see in the dialog:

Remember, if you are using a password (such as xyz), this needs to be supplied too (in the form: -pxyz).

When you click OK, the MySQL Admin tool will create the database.

If you prefer to enter database commands at the MySQL Commandline, you can add that to the Tools menu too. Here are the settings I use for this...

Bookmark and Share   Keywords:  ide  tutorial
© SapphireSteel Software 2013

lipitor abrupt cessation in california information about paris purim celebrex chemical formula amoxicillin suspension welbutrin xl inderal swollen liver paxil diarrhea with pravachol buy generic norvasc info about welchol vrs zetia shivani arjuna epogen cost http://www.region-limousin.fr/?buy=847283 luvox empathy coumadin programs purim fasting allegra lincoln ne actos kidney failure http://www.region-limousin.fr/?buy=999618 more no prescription combivent amoxicillin directions information about lamisil pellets about nizoral for acne fougera erythromycin ophthalmic http://www.region-limousin.fr/?buy=333974 rogaine wholesale canada in uk lipitor bowel movements http://www.region-limousin.fr/?buy=93862 about generic pristiq http://www.region-limousin.fr/?buy=214222 about lamictal concomitant seroquel more tylenol in babies avapro 300 in usa http://www.region-limousin.fr/?buy=110020 cafergot rx quinine tonic recipe extacy lexapro in mexico ampicillin oral med aciphex proper diet information omeprazole swollen feet medrol med pack dexamethasone myeloma in usa lamisil novartis in united states akathisia abilify paxil cr advantages canadian tylenol adult add strattera in new york avodart danger levaquin cvs diarreha from topamax lamictal pregabalin more diflucan flonase http://www.region-limousin.fr/?buy=493025 bayer aleve manufactured info about ashwagandha studies clomid information about c difficile cipro flexeril blood pressure