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

## [Name](#Name)

mysql\_stat - Returns current server status

## [Synopsis](#Synopsis)

```
#include <mysql.h>
const char * mysql_stat(MYSQL * mysql);
    
```

## [Description](#Description)

mysql\_stat() returns a string with the current server status for uptime, threads, queries, open tables, flush tables and queries per second.

## [Parameter](#Parameter)

•

mysql - a mysql handle, which was previously allocated by [**mysql\_init(3)**](/man/enterprise-packages/mariadb-11.2/mysql_init.3) and connected byy [**mysql\_real\_connect(3)**](/man/enterprise-packages/mariadb-11.2/mysql_real_connect.3).

## [Notes](#Notes)

For a complete list of other status variables, you have to use the \[show-status()](SHOW STATUS]] SQL command.

## [Return value](#Return_value)

Returns a string representing current server status.

## [See also](#See_also)

•

mysql\_get\_server\_info() (mysql\_get\_server\_info)

Version 3.3.1

---

Document: mysql_stat(3) from mariadb-11.2 11.2.5-r0 (Chainguard OS)
