S
S
Sergey Pugovkin2016-10-21 15:33:11
MySQL
Sergey Pugovkin, 2016-10-21 15:33:11

How to find out the path to the 'resty.mysql' module?

Debian 8. Installed
extended nginx:
apt-get lua-resty-mysql
In nginx config I write:

location = /ssi {
    internal;
    content_by_lua_block {
        local mysql = require "resty.mysql"
        local db, err = mysql:new()
    }
}

As a result, the error:
module 'resty.mysql' not found
As far as I understand from here https://github.com/openresty/lua-resty-mysql#synopsis , you need to specify there even before the library, something like this:
lua_package_path "/path/to/lua-resty-mysql/lib/?.lua;;";

Well, actually, the most important question: where to look for this /path/to/lua-resty-mysql ?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Matvey Safronov, 2016-10-21
@Driver86

Гитхаб не работает сейчас. Через пакетный менеджер luarocks можете поставить (если оно):
https://luarocks.org/modules/nbz4live/lua-resty-mysql
Если разместите его в папке, например, /home/bar/, тогда путь будет выглядеть так примерно:
lua_package_path "/home/bar/?.lua;;";

Сергей Пуговкин, 2016-10-21
@Driver86 Автор вопроса

Поиск apt-cache search lua дал из множества кое-что похоже на нужное:
Оно? Ставить?

V
Vladimir, 2016-12-06
@vintello

and once again to wrap in select and to make sorting? not ?

M
Melkij, 2016-12-06
@melkij

Set sql_mode to ONLY_FULL_GROUP_BY and then, finally, this strange mysql will no longer allow you to do strange things with grouping, which results in no less strange results depending on the phase of the moon.
www.sql.ru/forum/687908/faq-vyborka-pervoy-posledn...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question