0

I'm using SBCL on Windows. I got an error When I attempted to connect MYSQL using CLSQL like this.

(ql:quickload :clsql)
(clsql:connect '("localhost" "database-name" "database-user-name" "password") 
         :database-type :mysql) 
Couldn't load foreign libraries "libmysqlclient", "libmysql". (searched CLSQL-SYS:*FOREIGN-LIBRARY-   SEARCH-PATHS*: (#P"C:/Users/Razenrote/AppData/Roaming/quicklisp/dists/quicklisp/software/clsql-20140316-git/db-mysql/"))  
1ambda
  • 1,145
  • 8
  • 19
  • You have to [tell Windows how to find the DLLs](http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx#search_order_for_desktop_applications). The easiest way is to put that directory in the `PATH` environment variable. Depending on the Windows version, you can also use `SetDllDirectory` (XP SP1 +) or `AddDllDirectory`/`RemoveDllDirectory`/`SetDefaultDllDirectories` (8+, or Vista/7 with KB2533623). – acelent Mar 24 '14 at 17:04
  • @acelent I tried but completely failed. After Installing `MySQL C Connector`, I add the directory which includes `libmysql.dll` into `PATH` environmental variable. But,, I can't still load it. – 1ambda Mar 25 '14 at 05:52
  • Anyone who are using `CL-MYSQL` on Windows? Now I'm trying to use `CL-MYSQL` on Ubuntu x86. – 1ambda Mar 25 '14 at 05:55
  • Try debugging the problem with [Dependency Walker](http://www.dependencywalker.com/), you might find other directories you'll have to include in `PATH`. – acelent Mar 26 '14 at 15:18

1 Answers1

1

A note at the bottom of the clsql home page (http://www.cliki.net/CLSQL) addresses your issue.

user1597986
  • 113
  • 4