Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Databaselink and MySQL

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72886] Re: [mg72873] Databaselink and MySQL
  • From: Chris Williamson <chrisw at wolfram.com>
  • Date: Wed, 24 Jan 2007 05:42:06 -0500 (EST)
  • References: <200701231026.FAA09263@smc.vnet.net> <45B60F2A.5010201@wolfram.com> <c2baae590701230740w1bf00dc6w8ff1548250ee6bab@mail.gmail.com>

I am not certain what the first error is...

As to the second, what is version of the mysql driver are you using?  
Look in c:\\program files\\wolfram 
research\\mathematica\\5.2\\AddOns\\Applications\\DatabaseLink\\Java.  
(5.2 if you are using Mathematica 5.2, 5.1 if you are using Mathematica 5.1)

Chris

Stern wrote:
> Interesting. I think I am getting closer, but not quite there yet.
>
> The connection file now reads
> SQLConnection[JDBC["mysql", "localhost:3306/dbsterntest"],
> "Name" -> "MySQL test2", "Description" ->
>  "test connection to dbsterntest MySQL database", "Username" -> "root",
> "Password" -> "$Prompt", "RelativePath" -> False, "Version" -> 1.]
>
> The location is $UserBaseDirectory/DatabaseResources, as it was before.
>
>
> Two problems:
>
> 1. OpenSQLConnection creates a continuous stream of errors.
>
> Syntax::"stresc : "Unknown string escape \P. More...
> Syntax::"stresc : "Unknown string escape \M. More...
> Syntax::"stresc : "Unknown string escape \M. More...
> Syntax::"stresc : "Unknown string escape \d. More...
>
> 2. JDBC::error: JDBC error: Communication failure during handshake. Is 
> there a \
> server running on localhost:3306?
>
> There is a server running on localhost:3306; I have no trouble
> connecting to it from dedicated MySQL client software.
>
> More help?
>
> Thank you in advance.
>
> Michael Stern
>
> On 1/23/07, Chris Williamson <chrisw at wolfram.com> wrote:
>> First your conf file should contain the location of your server such...
>>
>> SQLConnection[JDBC["mysql", "myhost:3306/testdb"], "Name" -> "MySQL 
>> test", "Description" -> "test
>> connection to MySQL database", "Username" -> "root", "Password" -> 
>> "$Prompt", "RelativePath" -> False, "Version" -> 1.]
>>
>>
>> Next try putting your conf file in
>> $UserBaseDirectory/DatabaseResources.  Then use the name to call
>> OpenSQLConnection["MySQL test"].
>>
>> Chris
>>
>> Stern wrote:
>> > I am trying to connect to a MySQL database using Mathematica's
>> > databaselink library. I can connect to the test databases provided
>> > with Mathematica (which are HSQL databases), and my MySQL databases
>> > work well on their own, but when I try to connect to the MySQL
>> > database from Mathematica, I get errors.
>> >
>> > My connection file looks like this: SQLConnection[JDBC["mysql",
>> > ToFileName["C:\Program Files\MySQL\MySQL Server 5.0\data",
>> > "dbsterntest"]], "Name" -> "MySQL test", "Description" -> "test
>> > connection to MySQL database", "Username" -> "root", "Password" ->
>> > "$Prompt", "RelativePath" -> False, "Version" -> 1.]
>> >
>> > I have also tried with the OpenSQLConnection command directly,
>> > OpenSQLConnection[JDBC["mysql","C:\Program Files\MySQL\MySQL Server
>> > 5.0\data\dbsterntest"],Username->"root",Password->"$Prompt"]
>> >
>> > In both cases, I get the following error: JDBC::error: JDBC error:
>> > Cannot load connection class because of underlying \ exception:
>> > 'java.lang.NumberFormatException: For input string: "\Program \
>> > Files\MySQL\MySQL Server 5.0\data\dbsterntest"'.
>> >
>> > Help?
>> >
>> >
>>
>


  • Prev by Date: Re: FourierTransform help
  • Next by Date: Re: Databaselink and MySQL
  • Previous by thread: Re: Databaselink and MySQL
  • Next by thread: Re: Databaselink and MySQL