mysql\_errno(3) MariaDB Connector/C mysql\_errno(3)

## [Name](#Name)

mysql\_errno - returns the last error code for the most recent function call

## [Synopsis](#Synopsis)

```
#include <mysql.h>
unsigned int mysql_errno(MYSQL * mysql);
    
```

## [Description](#Description)

Returns the last error code for the most recent function call that can succeed or fail. Zero means no error occurred.

## [Parameter](#Parameter)

•

mysql is a connection identifier, which was previously allocated by [**mysql\_init(3)**](/man/os/mariadb-10.6/mysql_init.3) and connected by [**mysql\_real\_connect(3)**](/man/os/mariadb-10.6/mysql_real_connect.3).

## [Notes](#Notes)

•

Client error codes are listed in errmsg.h header file, server error codes are listed in mysqld\_error.h header file of the server source distribution.

## [See also](#See_also)

•

[**mysql\_error(3)**](/man/os/mariadb-10.6/mysql_error.3)

•

[**mysql\_sqlstate(3)**](/man/os/mariadb-10.6/mysql_sqlstate.3)

Version 3.3.1

---

Document: mysql_errno(3) from mariadb-10.6 10.6.12-r1 (Chainguard OS)
Source: https://github.com/MariaDB/server.git
