Forum: Ruby on Rails mysql is not recognized as an internal or external command

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bo V. (Guest)
on 2006-01-10 01:00
Hi,
An absolute newbie to RoR, I'm currently going through a few of the
excellent tutorials that are available on the subject.

One of these includes running a script for creating a mySQL table. In
the command prompt (XP), I try

mysql depot_development <db/create.sql

but get the following error:

'mysql' is not recognized as an internal or external command, operable
program or batch file.

Any ideas as to what goes wrong?

Br and thx in advance,
/Bo
Allen F. (Guest)
on 2006-01-10 01:14
(Received via mailing list)
Hi!

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.
Jesse F. (Guest)
on 2006-01-10 01:20
(Received via mailing list)
Allen F. wrote:
> Hi!
>
> 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.


--
Jesse F. <removed_email_address@domain.invalid>
University of Chicago - NSIT Web Services
AIM:    farmerje
Jabber: removed_email_address@domain.invalid
Phone:  (773)363-1058
Bill W. (Guest)
on 2006-01-10 02:14
(Received via mailing list)
> Jesse F. wrote:
<snip>
> 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:
1) the software is not installed
2) 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
Bo V. (Guest)
on 2006-01-10 09:06
Bill W. wrote:
>> Jesse F. wrote:
> <snip>
>> 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:
> 1) the software is not installed
> 2) 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)

Did I set up some privileges incorrect or?

Br Bo
David m (Guest)
on 2006-01-13 06:22
(Received via mailing list)
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



Take care,
Dave



"Bo Vittrup" <removed_email_address@domain.invalid> wrote in message
news:removed_email_address@domain.invalid...
This topic is locked and can not be replied to.