Small library for logging to MySQL
Assuming that LOG_ENTRY.event can have arbitrary string content, your code is vulnerable to an SQL injection attack.  You must escape strings in queries, and not copy them blindly into the query.

The 256-byte limit for the query buffer seems artificially limiting.  I would expect your library to do whatever it takes to compose and execute the right SQL query without bungling it with an undersized buffer.  One way to do that without malloc() or variable-length arrays is to define the struct to match the table definition.

typedef struct {
    int severity;
    char event[129]; /* 128 characters plus NUL. Latin1 means 1 byte per character */
    char source[33];
    struct tm tm_info;
} LogEntry;


The buffer would need to be large enough to accommodate the fixed text and the substituted strings, keeping in mind that mysql_real_escape_string() can double the number of bytes.  (I would use sizeof(FIXED_QUERY) + 2 * sizeof(LogEntry) + 3 * sizeof(int) + 20 as a generous estimate of the needed buffer size.)  Out of paranoia for unterminated strings, I'd use placeholders like "%.128s" for snprintf().

ltdb is such a cryptic function name.  log_to_database() would be much better.

Requiring the program to be recompiled to change the password is not proper.  The caller should have to make a call to initialize the library with the database connection parameters.  Another approach, which is still sloppy but slightly better, is for your library to read the connection parameters from a configuration file.