Bo Vittrup
2006-Jan-09 23:00 UTC
[Rails] mysql is not recognized as an internal or external command
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 -- Posted via http://www.ruby-forum.com/.
Allen Fair
2006-Jan-09 23:11 UTC
[Rails] mysql is not recognized as an internal or external command
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. Bo Vittrup wrote:> 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 >
Jesse Farmer
2006-Jan-09 23:17 UTC
[Rails] mysql is not recognized as an internal or external command
Allen Fair 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 Farmer <farmerje@uchicago.edu> University of Chicago - NSIT Web Services AIM: farmerje Jabber: farmerje@im.uchicago.edu Phone: (773)363-1058
Bill Walton
2006-Jan-10 00:13 UTC
[Rails] mysql is not recognized as an internal or external command
> Jesse Farmer 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 Vittrup
2006-Jan-10 07:06 UTC
[Rails] Re: mysql is not recognized as an internal or external comma
Bill Walton wrote:>> Jesse Farmer 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, > BillHi 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 -- Posted via http://www.ruby-forum.com/.
David m
2006-Jan-13 04:20 UTC
[Rails] Re: mysql is not recognized as an internal or external command
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" <bo@vittrup.net> wrote in message news:1f2ff55cb9acd13907c1983b6113a2a3@ruby-forum.com...> 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 > > -- > Posted via http://www.ruby-forum.com/.