Hey, I'm back again with a new video that hopefully helps folks get their database connection initialized. Enjoy.
Announcement
Collapse
No announcement yet.
Database Setup
Collapse
X
-
The mariadb client libs are in your server installation by default. Check the plugins directory. You don't need to do anything other than make sure "mariadb" is in your server_config.json under the plugins section. If you're talking about installing the actual MariaDB database itself, then yeah that's beyond the scope of this video beyond the brief look I gave at the website near the beginning. If that's what you're looking for: https://mariadb.org/Originally posted by ZepTepProd View PostHey buddy, you don't show in your video where and how to get the mariadb dll! Can you send me it or show me how to create it please i'm lost
Comment
-
Hello I have error : bad argument #2 to 'mariadb_async_query' (expected string-like argument)
[LUA]function cmd_heure(player)
local query = mariadb_prepare(SQL, "SELECT CURRENT_TIMESTAMP()")
mariadb_async_query(SQL, query , cb_gettimestamp, player)
end
AddCommand("heure", cmd_heure)
function cb_gettimestamp()
local timestamp = mariadb_get_value_index(1, 1)
AddPlayerChat(player, "Il est : " .. timestamp)
end[/LUA]
Comment
-
Looks like mariadb_prepare returned a false boolean. Check the mariadb_log, maybe your connection isn't setup properly.Originally posted by KeyTur View PostHello I have error : bad argument #2 to 'mariadb_async_query' (expected string-like argument)
[LUA]function cmd_heure(player)
local query = mariadb_prepare(SQL, "SELECT CURRENT_TIMESTAMP()")
mariadb_async_query(SQL, query , cb_gettimestamp, player)
end
AddCommand("heure", cmd_heure)
function cb_gettimestamp()
local timestamp = mariadb_get_value_index(1, 1)
AddPlayerChat(player, "Il est : " .. timestamp)
end[/LUA]
Comment
-
[2020-07-31 11:37:43.671] [mariadb] [error] Connection::Connection - establishing connection to MariaDB database failed: #1045Originally posted by Talos View Post
Looks like mariadb_prepare returned a false boolean. Check the mariadb_log, maybe your connection isn't setup properly.
Yes Thanks
Comment

Comment