mysql_get_server_version(3)

πŸ“¦
version 13.0.2 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ mysql_get_server_version ✨

okay bestie, welcome to the MariaDB Connector/C corner of the internet πŸ’– this lil page is all about mysql_get_server_version β€” she's the one who tells you the numeric version of whatever server you're currently connected to. no cap.


🌸 NAME 🌸

mysql_get_server_version β€” returns numeric server version πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <mysql.h>

unsigned long mysql_get_server_version(MYSQL * mysql);

πŸŽ€ DESCRIPTION πŸŽ€

She returns an integer representing the version of the connected server. that's it, that's the whole vibe. one number, iconic, no extra drama 🫢


πŸ“ PARAMETER πŸ“

  • mysql β€” a connection identifier, which was previously allocated by mysql_init(3) and connected by mysql_real_connect(3). so basically, she needs an already-connected bestie to gossip about, not a random stranger you just made up ✨

πŸ’œ NOTES πŸ’œ

The form of the version number is:

VERSION_MAJOR * 10000 + VERSION_MINOR * 100 + VERSION_PATCH

so yeah, it's all math-pilled β€” major gets the big multiplier, minor gets the middle one, patch keeps it cute and small. iykyk πŸ’€


πŸ‘‘ RETURN VALUE πŸ‘‘

The version number of the connected server ⭐ like, literally the whole point.


🌈 SEE ALSO 🌈


Version 3.4 β€” and that's the tea, bestie 🍡✨ this was mysql_get_server_version(3) from the MariaDB Connector/C manual, version 3.4, and she ate, no crumbs left. go call her, go get that version number, slay πŸ’…πŸ’–πŸ¦‹

πŸ“¦ where this page comes from