Do you have the MySQL database properly installed? It does not come with
RoR, and you have to install it separately. http://mysql.com
Allen
PS - There may also be a package to install that includes RorR, MySQL
and perhaps other related software.
He is using Windows, which means it could very well be installed. One
doesn’t typically use the command-line interface on Windows, though, but
rather some sort of GUI front-end. I wouldn’t be surprised if MySQL is
installed but not in the PATH environment variable.
Someone with more experience using MySQL on Windows can make a
recommendation.
I wouldn’t be surprised if MySQL is
installed but not in the PATH environment variable.
Good guess, at least as a starting point.
Bo Vittrup wrote:
‘mysql’ is not recognized as an internal or external
command, operable program or batch file.
Any ideas as to what goes wrong?
Per Jesse’s comment above, the error above is the one Windows throws in
either of two cases:
the software is not installed
the software is installed but Windows can’t find the executable
I assume you’ve used Windows Explorer to verify that the mySQL software
exists on your computer. If not, please do.
You can check the PATH from the command line. Just enter PATH. If the
mySQL directory isn’t listed in what’s printed in response, and you used
the
Windows Installer to install the softtware, you probably need to
reinstall
it. The installer should have modified the PATH and, if it didn’t,
there
may be other stuff it had trouble with too. If you want to add the
mySQL
directory to the PATH yourself you can do it through Start -> Settings
->
Control Panel -> System -> Advanced tab -> Environment Variables button.
Best regards,
Bill
Hi again,
Thank you very much for the quick answers to my post. I realize that I
did not put mysql in PATH - it is now and now at least something happens
if I open a prompt and type ‘mysql’.
However, when trying to run mysql from ruby I now get the error:
Error 1045: Access denied for user ‘ODBC’@localhost’ (using password:
NO)
Hi Bo,
You need to make sure the MySQL Server is running.
If you installed the 4.1 version, you should see a MySQL program group
in
your Start menu.
Start > Programs > MySQL > MySQL Server 4.1 > MySQL Server Instance
Configuration Wizard. Use the Wizard to set up MySQL as a service that
starts when you start up your computer.
There is additional info in the my.ini file in C:\Program
Files\MySQL\MySQL Server 4.1
I wouldn’t be surprised if MySQL is
installed but not in the PATH environment variable.
Good guess, at least as a starting point.
Bo Vittrup wrote:
‘mysql’ is not recognized as an internal or external
command, operable program or batch file.
Any ideas as to what goes wrong?
Per Jesse’s comment above, the error above is the one Windows throws in
either of two cases:
the software is not installed
the software is installed but Windows can’t find the executable
I assume you’ve used Windows Explorer to verify that the mySQL software
exists on your computer. If not, please do.
You can check the PATH from the command line. Just enter PATH. If the
mySQL directory isn’t listed in what’s printed in response, and you used
the
Windows Installer to install the softtware, you probably need to
reinstall
it. The installer should have modified the PATH and, if it didn’t,
there
may be other stuff it had trouble with too. If you want to add the
mySQL
directory to the PATH yourself you can do it through Start -> Settings
->
Control Panel -> System -> Advanced tab -> Environment Variables button.
Best regards,
Bill
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.