Oracle 5.0 Reference Manual page 2137

Table of Contents

Advertisement

21.3.15.11: [2121]
You get an
binary blob size you want to insert using JDBC is safely below the
size.
21.3.15.12: [2121]
What should you do if you receive error messages similar to the following:
"Communications link failure – Last packet sent to the server was X ms ago"?
21.3.15.13: [2122]
Why does Connector/J not reconnect to MySQL and re-issue the statement after
a communication failure, instead of throwing an Exception, even though I use the
connection string option?
21.3.15.14: [2123]
How can I use 3-byte UTF8 with Connector/J?
21.3.15.15: [2123]
How can I use 4-byte UTF8,
21.3.15.16: [2123]
Using
to corruption when inserting BLOBs. How can this be avoided?
Questions and Answers
21.3.15.1: When I try to connect to the database with MySQL Connector/J, I get the following
exception:
SQLException: Server configuration denies access to data source
SQLState: 08001
VendorError: 0
What is going on? I can connect just fine with the MySQL command-line client.
MySQL Connector/J must use TCP/IP sockets to connect to MySQL, as Java does not support Unix
Domain Sockets. Therefore, when MySQL Connector/J connects to MySQL, the security manager in
MySQL server will use its grant tables to determine whether the connection is permitted.
You must add the necessary security credentials to the MySQL server for this to happen, using the
statement to your MySQL Server. See
GRANT
Note
Testing your connectivity with the
unless you add the "host" flag, and use something other than
for the host. The
you use the special host name localhost. If you are testing connectivity to
localhost, use
Warning
Changing privileges and permissions improperly in MySQL can potentially
cause your server installation to not have optimal security properties.
21.3.15.2: My application throws an SQLException 'No Suitable Driver'. Why is this happening?
There are three possible causes for this error:
• The Connector/J driver is not in your CLASSPATH, see
• The format of your connection URL is incorrect, or you are referencing the wrong JDBC driver.
• When using DriverManager, the
location of the Connector/J driver.
21.3.15.3: I'm trying to use MySQL Connector/J in an applet or application and I get an
exception similar to:
SQLException: Cannot connect to MySQL server on host:3306.
Is there a MySQL server running on the machine/port you
are trying to connect to?
Troubleshooting Connector/J Applications
ER_NET_PACKET_TOO_LARGE
useServerPrepStmts=false
Section 13.7.1.3,
command-line client will use Unix domain sockets if
mysql
127.0.0.1
jdbc.drivers
2117
[2920]
exception, even though the
max_allowed_packet
with Connector/J?
utf8mb4
and certain character encodings can lead
"GRANT
Syntax", for more information.
command-line client will not work
mysql
as the host name instead.
Section 20.3.3, "Connector/J
system property has not been populated with the
[466]
autoReconnect
localhost
Installation".

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents