mysql_real_connect语法:

 C++ Code 
1
2
3
4
5
6
7
8
 
MYSQL * mysql_real_connect(MYSQL * mysql,
                           const char * host,
                           const char * user,
                           const char * passwd,
                           const char * db,
                           unsigned int port,
                           const char * unix_socket,
                           unsigned long flags);

  参数说明

  mysql - a mysql handle, which was previously allocated by mysql_init().
  host - can be either a host name or an IP address. Passing the NULL value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol.
  user - the user name.
  passwd - If provided or NULL, the server will attempt to authenticate the user against those user records which have no password only. This allows one username to be used with different permissions (depending on if a password as provided or not).
  db - if provided will specify the default database to be used when performing queries.
  port - specifies the port number to attempt to connect to the server.  如果“port”不是0,其值将用作TCP/IP连接的端口号。port为0的话,使用mysql的默认tcp/ip端口3306.
  unix_socket - specifies the socket or named pipe that should be used.
  flags - the flags allows various connection options to be set:

  • CLIENT_FOUND_ROWS: Return the number of matched rows instead of number of changed rows.
  • CLIENT_NO_SCHEMA: Forbids the use of database.tablename.column syntax and forces the SQL parser to generate an error.
  • CLIENT_COMPRESS: Use compression protocol
  • CLIENT_IGNORE_SPACE: Allows spaces after function names. All function names will become reserved words.
  • CLIENT_LOCAL_FILES: Allows LOAD DATA LOCAL statements
  • CLIENT_MULTI_STATEMENTS: Allows the client to send multiple statements in one command. Statements will be divided by a semicolon.
  • CLIENT_MULTI_RESULTS: Indicates that the client is able to handle multiple result sets from stored procedures or multi statements. This option will be automatically set if CLIENT_MULTI_STATEMENTS is set.

mysql_real_connect 端口号说明的更多相关文章

  1. RabbitMQ修改端口号和心跳时间

    定读者正在Windows系列的操纵体系中装置好了Rabbit MQ后,请找到装置途径下的etc文件夹下,将rabbitmq.config.example备份一份,并点窜为config范例的文件,即为] ...

  2. Windows - 杀死占用某个端口号的进程

    Windows不像Linux,Unix那样,ps -ef 查出端口和进程号,然后根据进程号直接kill进程. Windows根据端口号杀死进程要分三步: 第一步 根据 端口号 寻找 进程号 C:\&g ...

  3. 单节点下多个Tomcat服务器并存的端口号配置

    一个服务器节点同时安装多个tomcat服务器时,如果仅仅修改访问端口号则会提示端口冲突启动失败,还需要修改另外端口号解决,一共需要修改3处地方,修改如下: 编辑配置文件:server.xml 1.首先 ...

  4. PHP就业班心得:IP与域名以及DNS和端口号的概念

    什么是IP地址 概念:IP地址就相当于人们的身份证号码!每一个连入Internet的计算机都应该有全世界独一无二的IP地址 IP地址是使用32个bit位来保存,也就是4个字节! 为了方便记忆,采用十进 ...

  5. linux系统下,查看端口号被哪个应用占用

    netstat -tunlp 会把所有端口和所有对应的程序显示出来. 用grep管道可过滤出来需要的信息.比如,17059端口号被占用了. 第一步:netstat -tunlp | grep 1705 ...

  6. Arcgis Server 10.2默认服务端口号修改方法

    本人安装Arcgis Server 10.2之后发布了一个地图服务,该服务默认使用的端口号是6080,本人使用的是教育网,使用教育网均能正常使用该服务,但是使用电信或者移动网络均不能正常访问该网站. ...

  7. SQL:安装多个实例,修改实例端口号,和IP加端口号连接实例

    sql server 安装第一个实例,默认实例的端口是1433, 一个库中如果有多个实例,从第二个实例开始的端口是动态端口,需要的话,自己手工指定为静态端口,如指定第二个实例为1434 或着随意一个如 ...

  8. weblogic端口号修改和内存参数配置

    1 端口号修改 如图 是详细路径 注:我用的weblogic版本是10.3 当刚创建完域的时候这个配置文件下没有Listen-port参数  第一次去控制台修改端口后就这个参数了

  9. SQL Server配置管理器的“别名”功能好处,实现内外网统一以及加了端口号导致的限制

    这里主要有两个别名,经过研究,最好两个都配置成一样的,减少排查. 操作: 点击[别名],右键[新建别名] 这里的别名能实现比如我一台远程服务器,加了端口的,如果要实现在SQL登录的时候,使用计算机名来 ...

随机推荐

  1. JavaScript第二课

    1.关于鼠标事件有: onmouseover(),onmouseout(),onmousedown(),onmouseup(),onclick()事件. 2.创建JavaScript对象: 方法1:通 ...

  2. ES6 变量解构用法

    1.数组解构,可以设置默认值 'use strict'; let [x, y = 'b'] = ['a']; //控制台输出b console.log(y); 2.对象解构 'use strict'; ...

  3. sql server 数据加密

    select EncryptByPassPhrase('hksjlm',qlrmc)jmsj,* into jmqlr from qlr where qlbh in('5201411120005',' ...

  4. CI框架下nginx重写规则

    因为: server { listen ; server_name 222.73.130.124; location / { index index.html index.htm index.php; ...

  5. 【Shiro】Apache Shiro架构之集成web

    Shiro系列文章: [Shiro]Apache Shiro架构之身份认证(Authentication) [Shiro]Apache Shiro架构之权限认证(Authorization) [Shi ...

  6. Js日常笔记之变量删除

    在Javascript是可以使用delete来手动删除变量,通过这样的方法让GC来回收内存,但在JS中并不是所有的对象都可以被删除的 JS中通过 var\function 声明因含有DontDelet ...

  7. Mysql各种类型字段长度

    1.数值类型 列类型 需要的存储量 TINYINT 1 字节 SMALLINT 2 个字节 MEDIUMINT 3 个字节 INT 4 个字节 INTEGER 4 个字节 BIGINT 8 个字节 F ...

  8. memcache stats命令详解

    参数不算多,我们来启动一个Memcache的服务器端:  /usr/local/bin/memcached -d-m 10 -u root-l 192.168.0.200-p 12000-c 256- ...

  9. 记一次netty版本冲突,报java.lang.NoSuchMethodError: io.netty.util.internal.ObjectUtil.checkPositive的问题

    elasticsearch 5.6中使用TransportClient初始化抛异常 在引入elasticsearch5.6的transportclient包中,会引入netty进行通信. <!- ...

  10. atitit.无为而治在企业管理,国家治理,教育领域的具体思想与实践

    atitit.无为而治在企业管理,国家治理,教育领域的具体思想与实践 1. 什么是无为而治 1 2. 无为而治的三个原则 1 3. 抓大放小 1 4. 治理国家 2 5. 企业管理 2 6. 教育领域 ...