Skip to content

mysql command prompt for a specific database

December 17, 2010

Tried running dbconsole and was getting the following error:

shell> bundle exec rails dbconsole
/Users/gaganawhad/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/commands/dbconsole.rb:75:in `exec': Permission denied - /usr/local/mysql (Errno::EACCES)
from /Users/gaganawhad/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/commands/dbconsole.rb:75:in `start'
from /Users/gaganawhad/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/commands/dbconsole.rb:9:in `start'
from /Users/gaganawhad/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/commands.rb:36:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

(Don’t get confused by the ‘bundle exec’. Ignore it if you do not know what it is used for. )

The question was, how do I get mysql command prompt for a particular database? Answer: Run the following command.

shell>mysql -u root dgnet_development
Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: