mysql_get_server_info(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_info(3) β€” MariaDB Connector/C edition πŸ’…

okay bestie, buckle up, because this one is short but it's a whole vibe πŸ¦‹


✨ NAME ✨

mysql_get_server_info β€” it hands you the server version, as a string, no cap πŸ’–


🌈 SYNOPSIS 🌈

#include <mysql.h>

const char * mysql_get_server_info(MYSQL * mysql);

πŸ’œ DESCRIPTION πŸ’œ

So like, this function returns the server version β€” that's it, that's the gig, and it does it as a string πŸŽ€

If things go sideways? It gives you NULL on failure. That's the whole deal fr fr 😭


πŸ“ PARAMETER πŸ“

  • mysql β€” a connection identifier, which was previously allocated by mysql_init(3) and connected by mysql_real_connect(3). Like, it's your lil connection bestie, already set up and ready to spill the tea πŸ’…

πŸŽ€ NOTES πŸŽ€

okay so if you want the numeric server version instead of the string version, please use mysql_get_server_version(3) β€” that's the one for numbers, iykyk ✨


πŸ‘‘ RETURN VALUE πŸ‘‘

Returns the server version as a zero terminated string, or NULL on failure πŸ’€

(yeah the original says "NULLon failure" β€” we're being cute about it but the meaning is exactly the same, no worries bestie 🫢)


πŸ¦‹ SEE ALSO πŸ¦‹


reminder: every single word above is doing its job β€” don't skip the NULL checks, they're giving main character energy 🌟

and that's the whole page, periodt πŸ’–βœ¨

Version 3.4 β€” MariaDB Connector/C. mwah, love u, go forth and check your server version responsibly πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from