MySQL 8.0.39
Source Code Documentation
|
#include <my_config.h>
#include <sql_common.h>
#include "dns_srv_data.h"
#include <netdb.h>
#include <resolv.h>
Functions | |
static bool | get_dns_srv (Dns_srv_data &data, const char *dnsname, int &error) |
MYSQL *STDCALL | mysql_real_connect_dns_srv (MYSQL *mysql, const char *dns_srv_name, const char *user, const char *passwd, const char *db, unsigned long client_flag) |
Connect to a server using a DNS SRV name. More... | |
|
static |
MYSQL *STDCALL mysql_real_connect_dns_srv | ( | MYSQL * | mysql, |
const char * | dns_srv_name, | ||
const char * | user, | ||
const char * | passwd, | ||
const char * | db, | ||
unsigned long | client_flag | ||
) |
Connect to a server using a DNS SRV name.
See rfc2782 for what a DNS SRV is and how is one read
mysql | a MySQL handle to use |
dns_srv_name | the name of the DNS SRV resource to query. ANSI |
user | the user name to pass to mysql_real_connect |
passwd | the password to pass to mysql_real_connect |
db | the database to pass to mysql_real_connect |
client_flag | the client flag to pass to mysql_real_connect |
NULL | an error has occurred |
non-NULL | the connected MySQL handle to use |
If the OS doesn't support it the function returns OS error -1.
SRV FORMAT: _service._proto.name. TTL class SRV priority weight port target.
Example: _sip._tcp.example.com. 86400 IN SRV 0 5 5060 sipserver.example.com.