Error using artful MySQL module

Source: Internet
Author: User
Tags git clone setf

Always error:

[Email protected]:/opt# newlispnewlisp v.10.6.0 64-bit on Linux ipv4/6 UTF-8 libffi, options:newlisp-h> (load "/opt/m YSQL.LSP ") err:string expected in function import:libmysqlclient

It turns out that the path to the libmysqlclient.so installed under Ubuntu 12.04 is not normal, and find/-name to add the real path to the MYSQL.LSP file.

;;; Find the Libmysqlclient library on this system                                                                                               (SETF is-64-bit Nil) (Let (Paths ' ("/usr/lib/libmysqlclient.so"               " /usr/lib/x86_64-linux-gnu/libmysqlclient.so ";; Here               "/usr/lib64/mysql/libmysqlclient.so" "/usr/local/mysql/lib/libmysqlclient.dylib" "               /opt/local/ Lib/libmysqlclient.dylib ""/sw/lib/libmysqlclient.dylib ")))               

OK, load the module successfully:

> (Load "/OPT/MYSQL.LSP") MAIN

But the connection database error, the original is not keeping up with the pace of Newllisp 10.6.0. Now get the latest test-tested code:

git clone https://gist.github.com/10490156.git

> (Load "/OPT/10490156/MYSQL.LSP")                                                                                                                                             MAIN                                                                                                                               > _mysql:is-64-bit                                                                                                                                             True                                                                                                                            > (setf db (Mysql))                                                                                                                                 (Mysql 10710960)                                                                   > (: Connect db "localhost" "root" "770328" "MySQL")                           True                                                                                                                      > (: Query db "Show tables")                                                                                                                           (Mysqlresult 10812080) > (exit)

It seems to be available, in detail, and so on, after the author has tested.

http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=16&t=4502


http://www.artfulcode.net/articles/a-better-mysql-module-for-newlisp/


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.