Couldn't find database client: mysql, mysql5, mysql.exe, mysql5.exe. Check your $PATH and try again

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

On Dec 10, 6:08pm, Scott S. [email protected] wrote:

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!

To be able to use “rails dbconsole”, mysql.exe needs to be in the
PATH.

Doing “rails dbconsole” is exactly the same as doing to MySQL Console
Client shortcut that should have been installed in your system.

If not, you can add the location of your MySQL installation (where
mysql.exe lives) to the PATH doing the following on a console:

SET PATH=%PATH%;C:\path\to\mysql

However, to avoid issues with spaces and such, I recommend you use the
MySQL Console Client shortcut.


Luis L.

Thank you Luis. Using SET PATH fixed the issue with rails dbconsole.