Hi Thomas,

Thomas Ronayne wrote:
> 
> I've trying to, using the data base wizard, set up a MySQL connection.
> 
> I have, apparently, successfully set up the JDBC connection (Test class 
> reports that the JDBC driver was loaded successfully).
> 

Ok - so I'm assuming that you verified that the com.mysql.jdbc.Driver is
succesfully loaded, right?


Thomas Ronayne wrote:
> 
> I'm trying to connect to a data base named "sakila" on "localhost" port 
> "3306 using driver class "com.mysql.jdbc.Driver." This is the test data 
> base from  Roland Bouman's blog about connecting MySQL to OpenOffice. I 
> can connect to that data base with "mysql --user=username 
> --password=password sakila" and can waltz around looking at tables and 
> everything that I expect to be able to do in MySQL.
> 

Ok - so your database seems to be in place.


Thomas Ronayne wrote:
> 
> I have tried every combination I can think of for Server URL; localhost, 
> mysql://localhost, http://localhost, 127.0.0.1, etc., etc. and cannot 
> get connected to that or any other data base. Using, say, 
> mysql://localhost the error is "must specify port after ':' in 
> connection string. Using localhost (or the address of the machine on the 
> local network) the error is "communications link failure due to 
> underlying exception:" and the rest of the error message is obscured by 
> and OK button that does nothing but may be ** BEGIN NESTED EXCEPTION ** 
> java:net.socketException.
> 

If you used the drop down listbox in the Base Database wizard to create a
MySQL connection through JDBC (you choose that by clicking the appropriate
jdbc radiobutton) you should just enter the network name or IP address of
your database host in the "Server URL" field. I can understand why you are
getting an error when you use something like "mysql://something" or
"http://something";, but normally it should work with these names:

127.0.0.1 

or 

localhost

This is all described in detail at
http://rpbouman.blogspot.com/2006/12/mysql-meets-openofficeorg.html

There is a possibility that there is something wrong with TCP/IP network
configuration. Connecting to your mysql database directly using the command
line client might still be possible in that case if you are connecting using
a socket file (*nix) or named pipes or shared memory. You can test this
connection using your command line client by adding a --protocol=tcp option
to your command line like this:

mysql --user=username --password=password --database=sakila --protocol=tcp

If this does not connect you to the database, something is wrong with your
TCP/IP configuration, either for MySQL, or for your system as a whole.

Can you please tell us what operating system you are on? 
-- 
View this message in context: 
http://www.nabble.com/JDBC%3A-Communications-Link-Failure-Due-to-Underlying-Exception-tf2790451.html#a8123686
Sent from the openoffice - users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to