---
name: "mysql_server_init"
section: "3"
platform: "linux"
package: "mariadb"
version: "13.0.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/mysql_server_init"
---

# mysql\_server\_init(3)

### Name

mysql\_server\_init - Initializes library

### Synopsis

-

  ```
  #include <mysql.h>
  int mysql_library_init(int argc __attribute__((unused)),
                         char **argv __attribute__((unused)),
                         char **groups __attribute__((unused)))
  ```

### Description

Call to initialize the library before calling other functions.

### Parameters

All parameters are unused, they only exist for compatibility reasons.

### Notes

- •

  Call **[mysql\_server\_end(3)](/mysql_server_end/3.md)** to clean up after completion.

- •

  If the library was not explicitly initialized by `mysql_server_init()` any call to **[mysql\_init(3)](/mysql_init/3.md)** will automatically initialize the library.

- •

  `mysql_library_init()` is an alias for `mysql_server_init()`

### Return value

Returns zero for success, or nonzero if an error occurred. ## See also \* **[mysql\_server\_end(3)](/mysql_server_end/3.md)**
