I am trying to use mysql instead of sqlite in RoR.(using Aptana Studio)
I added this line to the gem file
gem ‘mysql2’
2)ran bundle install
3)made changes to the database.yml file
default: &default
adapter: mysql2
pool: 5
timeout: 5000
encoding: utf8
username: root
password: ******
host: 127.0.0.1
port: 3306
development:
<<: *default
database: rails_development
(has test and production also)
I type rails dbconsole / rails db on the terminal and get this error:
Couldn’t find database client: mysql, mysql5, mysql.exe, mysql5.exe.
Check your $PATH and try again.
I added C:\Program Files\MySQL\MySQL Server 5.5\bin to the path
there is no output on the console.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
Don’t know, because I don’t work with Windows—just wanted to make sure
you had MySQL.
One other thing, the log snippet you posted looked kind of like the
server was running and client was failing to connect—but I’m not sure.
Have you checked in Task Manager whether there is any pg process
running?
I had similar issue. It turned out there were double quotes around MySQL
path in the %PATH% variable. While windows could recognize the path,
rails
couldn’t. Removing the quotes enables rials (and windows) to see the
path.
Error case: PATH = …;“C:\Program Files\MySQL\MySQL Server
5.5\bin”;…
Good case: PATH = …;C:\Program Files\MySQL\MySQL Server 5.5\bin;…