MathGroup Archive 2007

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

Search the Archive

Databaselink and MySQL

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72873] Databaselink and MySQL
  • From: Stern <nycstern at gmail.com>
  • Date: Tue, 23 Jan 2007 05:26:27 -0500 (EST)

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: MathKernel crashes
  • Next by Date: Re: Re: Newbie question - saving file in command-line
  • Previous by thread: Re: Zeroes of Zeta function
  • Next by thread: Re: Databaselink and MySQL