[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re:Need Help with Lua mysql connectivity
- From: T Poojita/CHN/TCS <t.poojita@...>
- Date: Tue, 29 Jul 2014 17:14:41 +0530 (IST)
Hi Tomas,
Thank for your clear explanation.
We compiled & successfully connected with MySQL.
Thanks again.
Regards,
Poojita
----- Original Message -----
From: Tomas Guisasola Gorham <tomas@tecgraf.puc-rio.br>
To: T Poojita/CHN/TCS <t.poojita@tcs.com>
Cc: lua-l@lists.lua.org
Sent: Mon, 28 Jul 2014 20:21:46 +0530 (IST)
Subject: Re:Need Help with Lua mysql connectivity
Hi Poojita
There is no mysql.so in the Github repository because it is a
source code repository. One have to compile the code before using it.
There is no postgres.so, nor sqlite.so either. All the files are
source code.
There is no mysql.lua (nor any other .lua file) because LuaSQL
is a binding that lets Lua communicate to database drivers. Since these
drivers expose a C API (not a Lua API) the code is written in C. Thus it
must have to be compiled before use :-)
You are the right place. Try compiling it (run 'make') and
install it ('make install'). You should take a look at the Makefile
and config files to check whether the paths are correct.
Regards,
Tomás
On Mon, 28 Jul 2014, T Poojita/CHN/TCS wrote:
>
Dear Tomas,
Thank you for your reply.
I have a doubt regarding the libraries included in luasql package. When I downloaded the luasql-master zip file from Github (https://github.com/keplerproject/luasql), it did not have mysql.so library in <lua_package>/src which would be installed in the/usr/local/lib/lua/5.2/luasql path.
Also, mysql.lua is not present in the package. I am attaching the screenshot of the Github page for your reference.
I looked for downloading mysql.so separately, but found no luck.
I am in doubt, whether the above Github luasql is the right package for testing mysql db connectivity using lua.
Kindly share your thoughts.
Thanks for your time.
Regards,
Poojita
---
Message: 1
Date: Fri, 25 Jul 2014 08:15:14 -0300 (BRT)
From: Tomas Guisasola Gorham
Subject: Re: Need help in Connecting to MySQL
To: Lua mailing list
Message-ID:
Content-Type: text/plain; charset="iso-8859-1"
Hi Poojita
Check where the library (mysql.so) have been installed. It should
be at /usr/local/lib/lua/5.2/luasql/mysql.so.
Regards,
Tom=E1s
On Fri, 25 Jul 2014, T Poojita/CHN/TCS wrote:
> =
Hi Users,
I have been learning Lua recently and trying to connect to a local MySQL =
Database.
Lua has been installed in my Linux machine at location /usr/local/
Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
I downloaded Luasql package from github and installed using makefile. The b=
elow path /usr/local/lib/lua/5.2/luasql contains
the below files related to MySQL.
ls_mysql.c
mysql.def
When I try to run a sample mysql program I get the following error.
lua: testing.lua:3: module 'luasql.mysql' not found:
no field package.preload['luasql.mysql']
no file '/usr/local/share/lua/5.2/luasql/mysql.lua'
no file '/usr/local/share/lua/5.2/luasql/mysql/init.lua'
no file '/usr/local/lib/lua/5.2/luasql/mysql.lua'
no file '/usr/local/lib/lua/5.2/luasql/mysql/init.lua'
no file './luasql/mysql.lua'
no file '/usr/local/lib/lua/5.2/luasql/mysql.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './luasql/mysql.so'
no file '/usr/local/lib/lua/5.2/luasql.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './luasql.so'
stack traceback:
[C]: in function 'require'
testing.lua:3: in main chunk
[C]: in ?
Request your kind support, as how to configure Lua to use luasql in connect=
ing to MySQL.
Thanks in advance..
Regards,
Poojita
-----------------------------------------------------------------------------------------------------------------------------
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
--
--