Greetings,
I am trying to get MySQL to run with Rails, but when I try to get it to
run using “rails dbconsole” I get this error:
C:\IS410\Programs\sqltest3>rails dbconsole
Couldn’t find database client: mysql, mysql5, mysql.exe, mysql5.exe.
Check your
$PATH and try again.
I have MySQL installed, along with the MySQL driver. I read alot of
posts in forums saying it might not be in my $PATH. Where is this $PATH
so I can look to make sure MySQL is in there. Thank you!
Here is my database.yml.
MySQL. Versions 4.1 and 5.0 are recommended.
Install the MYSQL driver
gem install mysql2
Ensure the MySQL gem is defined in your Gemfile
gem ‘mysql2’
And be sure to use new-style password hashing:
http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: sqltest3_development
pool: 5
username: root
password: password
host: localhost
Warning: The database defined as “test” will be erased and
re-generated from your development database when you run “rake”.
Do not set this db to the same as development or production.
test:
adapter: mysql2
encoding: utf8
reconnect: false
database: sqltest3_test
pool: 5
username: root
password: password
host: localhost
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: sqltest3_production
pool: 5
username: root
password: password
host: localhost