m4dc4p / haskelldb

A library for building re-usable and composable SQL queries.
BSD 3-Clause "New" or "Revised" License
102 stars 17 forks source link

Can't connect to MySQL server #6

Open kdridi opened 12 years ago

kdridi commented 12 years ago

Hello,

I'm a beginner in haskell and i have a problem using haskelldb. I've developped this code : http://hpaste.org/76300 When i use ghci, it works like a charm. However, when i compile it using ghc, the program connects sometime to the mysql server and sometime not. The program is quite simple so i'm wondering if you have any clue about the error.

Thank you !

Test: user error (SQL error: SqlError {seState = "", seNativeError = 2003, seErrorMsg = "Can't connect to MySQL server on '192.168.1.10' (4)"})

kdridi commented 12 years ago

One more thing that may help

$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.4.2

cabal list --installed haskelldb

cabal list --installed hdbc

m4dc4p commented 12 years ago

Try connecting by just using HDBC first. It may not be a HaskellDB issue at all.

Finally, GHCi and GHC use different rules to find libraries. You'll need to do some research to determine what's going on.