Open a MySQL shell using credentials from database.yml

Posted Over 12 years ago. Visible to the public.

In order to open a MySQL shell without the need to enter user and password, you can say the following in any Rails 2 project:

script/dbconsole -p

In Rails 3 you can say:

rails dbconsole -p

If you'd like to enter a database for an environment other than development you can say:

script/dbconsole -p staging
Henning Koch
Last edit
About 12 years ago
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2011-10-06 11:39)