mysql_stat(3)
π NAME π
mysql_stat β bestie, this one hands you the server's current status, like a little vibe check for your MariaDB server π
It lives in the MariaDB Connector/C family, and the page you're reading is mysql_stat(3) β¨
πΈ SYNOPSIS πΈ
#include <mysql.h>
const char * mysql_stat(MYSQL * mysql);
π DESCRIPTION π
okay so mysql_stat() gives you back a string stuffed with the server's current status. Specifically it's serving up:
- uptime
- threads
- queries
- open tables
- flush tables
- queries per second
that's the whole menu, no cap π
π¦ PARAMETER π¦
mysqlβ a mysql handle π«Ά which you already got earlier frommysql_init(3)and then actually connected withmysql_real_connect(3). Don't hand it a rando pointer, she needs a real one π
β¨ NOTES β¨
if you want the complete list of other status variables (because this function is lowkey only showing you a handful), you gotta go run the SHOW STATUS SQL command yourself π
not me reminding you that mysql_stat() is not the full picture β it's giving highlight reel, not the whole documentary πΈ
π RETURN VALUE π
Returns a string representing the current server status. that's it, that's the tea β
π SEE ALSO π
mysql_get_server_info()
and that's the page, bestie!! this was mysql_stat(3) from Version 3.4 of the MariaDB Connector/C docs β tysm for reading, mwah, go check your server status, slay πππ¦β¨
π¦ where this page comes from
- alpine 3.22: mariadb-doc 11.4.13-r0 Β· GPL-2.0-or-later
- alpine 3.23: mariadb-doc 11.4.13-r0 Β· GPL-2.0-or-later
- alpine 3.24: mariadb-doc 11.8.9-r0 Β· GPL-2.0-only
- arch rolling: mariadb 13.0.2-2 Β· GPL-2.0-only
- arch rolling: mariadb-lts 12.3.3-2 Β· GPL-2.0-only
- centos-stream 10: mariadb-connector-c-doc 3.4.4-2.el10 Β· LGPL-2.1-or-later
- debian trixie: libmariadb-dev 1:11.8.6-0+deb13u1 Β· GPL-2.0-only
- fedora 43: mariadb-connector-c-doc 3.4.5-2.fc43 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01
- fedora 43: mariadb-connector-c-doc 3.4.9-2.fc43 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01 AND LicenseRef-Fedora-Public-Domain
- fedora 44: mariadb-connector-c-doc 3.4.8-3.fc44 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01
- fedora 44: mariadb-connector-c-doc 3.4.9-2.fc44 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01 AND LicenseRef-Fedora-Public-Domain
- nixpkgs unstable: mariadb-server 11.8.8
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- ubuntu questing: libmariadb-dev 1:11.8.3-1build1
- ubuntu resolute: libmariadb-dev 1:11.8.6-5 Β· GPL-2.0-only
- ubuntu resolute: libmariadb-dev 1:11.8.6-5ubuntu0.1 Β· GPL-2.0-only
- ubuntu stonking: libmariadb-dev 1:11.8.9+ds-4ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms