473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Connector/J using JSP not happy???

ab
hi all,

we've installed MySQL on a Windows XP machine, but cannot connect to it
using JSP/Servlet. An error message comes up saying:
java.sql.SQLException: General error, message from server: "Incorrect
database name 'water'"
The database water exists on the server.

Class.forName( "com.mysql.jdbc.Driver" ).newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost/water
?user=root&password=");

yes, we've tried different databases and the error persists;
yes, we've tried different users and passwords and the error persists;
yes, we looked at the Connector/J documentation and sintax and it is OK
yes, we used google and search for errors but no luc.

we appreciate time and effort to assist us

thanks in advance

Trajano

P.S.

further information to confirm our environment

typing c:\mysql\bin\msqladmin version
Server version: 4.0.20a-debug
Protocol version 10
Connection: localhost via TCP/IP
TCP port: 3306

typing c:\mysql\bin\mysql -h localhost -u root -p
and
mysql>SHOW DATABASES;
Database
mysql
test
water

Jul 20 '05 #1
1 1635
ab
YES, we found the error,

con =
DriverManager.getConnection("jdbc:mysql://localhost/water?user=root&password
=");
/water?user=root

we cannot have a space between water and ?. an old Wrox book had an example
with a space and looking the Connector/J documentation

thanks for the attention

With kind regards,

Trajano
"ab" <ab*@def.com> wrote in message
news:40***********************@news.optusnet.com.a u...
hi all,

we've installed MySQL on a Windows XP machine, but cannot connect to it
using JSP/Servlet. An error message comes up saying:
java.sql.SQLException: General error, message from server: "Incorrect
database name 'water'"
The database water exists on the server.

Class.forName( "com.mysql.jdbc.Driver" ).newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost/water
?user=root&password=");

yes, we've tried different databases and the error persists;
yes, we've tried different users and passwords and the error persists;
yes, we looked at the Connector/J documentation and sintax and it is OK
yes, we used google and search for errors but no luc.

we appreciate time and effort to assist us

thanks in advance

Trajano

P.S.

further information to confirm our environment

typing c:\mysql\bin\msqladmin version
Server version: 4.0.20a-debug
Protocol version 10
Connection: localhost via TCP/IP
TCP port: 3306

typing c:\mysql\bin\mysql -h localhost -u root -p
and
mysql>SHOW DATABASES;
Database
mysql
test
water

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ruud vd Velden | last post by:
Hello, We're using Office XP on Windows 2000 SP4. After installing the Oracle Connector for Outlook the following problem occurs: Emails sent by Outlook, in HTML format, do have a strange...
0
by: MS | last post by:
Hi, My application uses J Connector's 'mysql-connector-java-3.1.6-bin.jar' file with jdk 1.5 on my Win 2000 system to connect to MySQL running on a Linux machine on my LAN and it works fine from...
7
by: C.E.O. Gargantua | last post by:
I am using the IBM DB2 Connector class of the Redistributable DB2 Run-Time Client Lite in a c# .net application using Visual Studio. Running the code: string myConnString =...
1
by: google_groups3 | last post by:
Has anybody ever used the (new) .NET connector from MySQL? I was just curious as to how good it was. Am i right o assume that it will still allow connections to non windows servers running MySQL...
5
by: asadikhan | last post by:
Hi, I am trying to configure my asp.net application to work with MySQL using Connector/NET and I wish to use connection pooling. What is the best way to do this? This is what I have so far: ...
5
by: rockdale | last post by:
Hi, All This is the first time that I code asp.net against mySQL database. I am confused that which connector should I use 'cause I do not want make the wrong choice and have some problems later...
2
by: Vague | last post by:
Hello There, I've recently been working on a large project, very database driven, in C# on windows systems, calling a MySQL database on a linux box. The project is going very well. Except that...
3
by: Vague | last post by:
Hello There, I've recently been working on a large project, very database driven, in C# on windows systems, calling a MySQL database on a linux box. The project is going very well. Except that...
6
by: shivapadma | last post by:
i want to access mysql database server from jsp program for this i downloaded mysql-connector-java-3.1.14.zip mysql-connector-java-3.1.14 folder contains mysql-connector-java-3.1.14-bin.jar...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.