File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Setting up MySQL on Windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Setting up MySQL on Windows" Watch "Setting up MySQL on Windows" New topic
Author

Setting up MySQL on Windows

Eric Kantola
Greenhorn

Joined: Nov 21, 2011
Posts: 5
I'm trying to teach myself Java Servlets and JSP pages. I'm using Murach's Java Servlets and JSP, 2nd edition book.
I'm supposed to download MySQL from the website then install it, which I've done. The book recommends I install MySQL at C:\Program Files\MySQL\MySQL Server 5.0. It further recommends installing the book files, including the database files at C:\murach\servlet_jsp\db. I've done that.
When I double-click on the setup_db.bat file to run it, I get the following error message," The system cannot find the path specified. 'mysql' is not recognized as an internal or external command, operable program or batch file."
Please note that Tomcat and Netbeans are setup and configured adequately, so I don't think it has any interoperation problems.
Knowing that Windows gets a little picky about spaces in it's classpath, I changed "MySQL Server 5.1" to "MySQL_Server5.1". I still get the same error message.
What am I doing wrong?
Thank you in advance for your helpful replies.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

THis doesn't seem to have anything at all to do with Servlets and JSP, so I've modified the subject a bit and moved it to the JDBC forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
dineshiop kumar
Greenhorn

Joined: Mar 05, 2009
Posts: 13
when you install mysql irrespective to the location you should add the jar file to the netbeans and connected it make sure the properties are correctly set
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I'm guessing that installing MySQL didn't change your PATH environment variable to include the bin folder of your MySQL install (or wherever mysql.exe ended up). If it didn't, then you're going to have to do that yourself.

(The PATH environment variable contains a list of Windows folders where Windows looks when you ask it to run some executable from the command line.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting up MySQL on Windows
 
Similar Threads
Error in Servlet compilation
Tomcat
Requested resource() not found
running java from the command prompt window
Basic instructions for setting up/running mySQL