14.01.2016, 09:49
Is it possible to query/insert data into a Mysql database in a LM4?
Read/write mysql database
|
14.01.2016, 09:49
Is it possible to query/insert data into a Mysql database in a LM4?
14.01.2016, 10:03
Install packages:
https://dl.openrb.com/pkg/zlib_1.2.7-1_mxs.ipk https://dl.openrb.com/pkg/libmysqlclient...-1_mxs.ipk https://dl.openrb.com/pkg/liblua-mysql_2.2.0-2_mxs.ipk Docs: http://keplerproject.github.io/luasql/do...anual.html Short example, don't use db as a variable name or you will mess up LM internal database connection Code: require('luasql.mysql')
14.01.2016, 13:38
perfect, it works!
20.03.2016, 10:33
Hi,
are these the correct packages for the LM3 Reactor? Thanks
21.03.2016, 06:59
Yes, you can use them on all devices except for Load Balancer and old LM2.
21.03.2016, 09:59
Great, thank you!
11.10.2016, 10:06
i have problems using mysql in the latest beta version
11.10.2016, 10:24
Yes, older packages will not work. Please install these:
https://dl.openrb.com/lm-16.09-rc2/pkg/z...-1_mxs.ipk https://dl.openrb.com/lm-16.09-rc2/pkg/l...-1_mxs.ipk https://dl.openrb.com/lm-16.09-rc2/pkg/l...-4_mxs.ipk
11.10.2016, 11:26
(11.10.2016, 10:24)admin Wrote: Yes, older packages will not work. Please install these: thanks, it works.
02.11.2016, 13:40
Hey, how can i write from my LM to mysql?
docs - error 404! sorry for my bad english...
02.11.2016, 13:44
(02.11.2016, 13:40)g2g2g2 Wrote: Hey, how can i write from my LM to mysql? require('luasql.mysql') env = luasql.mysql() dbcon = env:connect('db', 'user', 'password', 'host', 'port') if dbcon then cursor = dbcon:execute( 'your sql statement' ) dbcon:close() env:close() end
08.11.2016, 08:23
hey.. it not work!
i have LM4 reactor lite all lib install successful here is my script require("luasql.mysql"); env = assert(luasql.mysql()); log(env); -- // answer is "MySQL environment (0xb6ed5fa0)" dbcon = env:connect('base_test', 'root','pass', '192.168.1.40'); log(dbcon); -- // answer is "nil" cursor = dbcon:execute ( 'INSERT INTO devices (name) VALUES (\"test1\")' ); dbcon:close(); env:close();
08.11.2016, 08:26
Try this, it should tell you what's going on. Most probably your user cannot access the database remotely (privileges).
Code: dbcon, err = env:connect('base_test', 'root','pass', '192.168.1.40')
06.12.2016, 23:08
(14.01.2016, 10:03)admin Wrote: Install packages:The packages are no longer available? 404?
07.12.2016, 07:12
All available packages can be found here:
https://dl.openrb.com/lm-16.09/pkg/
07.12.2016, 08:45
Thank you! Do I need to have the latest firmware for this packages? And where do I see the current firmware the LM is running?
07.12.2016, 09:09
These are the same packages that come with the latest release firmware. Some are not installed by default (like MySQL) or are model-dependent. Current version can be seen in LM interface bottom left corner.
07.12.2016, 09:27
Ok, will update to the latest firmware and then install the MySQL packages.
18.12.2016, 00:05
Now running FW 20160927, but for all three packages I get the error "Update package file is invalid" when I try to install them (on the start page I go to "Logic Machine", enter my credentials, then go to "Utilities" tab, click "Install updates", click browse, select one of the three files, click "Save", then the "Update package file is invalid" message appears). What am I doing wrong? Thanks!
18.12.2016, 00:52
(This post was last modified: 18.12.2016, 01:04 by Erwin van der Zwart.)
Hi,
You follow the wrong steps (: Packages can be installed by system config -> system -> packages -> action -> + and browse to add package. Or with script with a os.execute command. (HL and SL can only be done through script as the menu options to install and remove packages are not default enabled in our FW) BR, Erwin |
« Next Oldest | Next Newest »
|