mysql_real_connect 端口号说明
mysql_real_connect语法:
|
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 端口号说明的更多相关文章
- RabbitMQ修改端口号和心跳时间
定读者正在Windows系列的操纵体系中装置好了Rabbit MQ后,请找到装置途径下的etc文件夹下,将rabbitmq.config.example备份一份,并点窜为config范例的文件,即为] ...
- Windows - 杀死占用某个端口号的进程
Windows不像Linux,Unix那样,ps -ef 查出端口和进程号,然后根据进程号直接kill进程. Windows根据端口号杀死进程要分三步: 第一步 根据 端口号 寻找 进程号 C:\&g ...
- 单节点下多个Tomcat服务器并存的端口号配置
一个服务器节点同时安装多个tomcat服务器时,如果仅仅修改访问端口号则会提示端口冲突启动失败,还需要修改另外端口号解决,一共需要修改3处地方,修改如下: 编辑配置文件:server.xml 1.首先 ...
- PHP就业班心得:IP与域名以及DNS和端口号的概念
什么是IP地址 概念:IP地址就相当于人们的身份证号码!每一个连入Internet的计算机都应该有全世界独一无二的IP地址 IP地址是使用32个bit位来保存,也就是4个字节! 为了方便记忆,采用十进 ...
- linux系统下,查看端口号被哪个应用占用
netstat -tunlp 会把所有端口和所有对应的程序显示出来. 用grep管道可过滤出来需要的信息.比如,17059端口号被占用了. 第一步:netstat -tunlp | grep 1705 ...
- Arcgis Server 10.2默认服务端口号修改方法
本人安装Arcgis Server 10.2之后发布了一个地图服务,该服务默认使用的端口号是6080,本人使用的是教育网,使用教育网均能正常使用该服务,但是使用电信或者移动网络均不能正常访问该网站. ...
- SQL:安装多个实例,修改实例端口号,和IP加端口号连接实例
sql server 安装第一个实例,默认实例的端口是1433, 一个库中如果有多个实例,从第二个实例开始的端口是动态端口,需要的话,自己手工指定为静态端口,如指定第二个实例为1434 或着随意一个如 ...
- weblogic端口号修改和内存参数配置
1 端口号修改 如图 是详细路径 注:我用的weblogic版本是10.3 当刚创建完域的时候这个配置文件下没有Listen-port参数 第一次去控制台修改端口后就这个参数了
- SQL Server配置管理器的“别名”功能好处,实现内外网统一以及加了端口号导致的限制
这里主要有两个别名,经过研究,最好两个都配置成一样的,减少排查. 操作: 点击[别名],右键[新建别名] 这里的别名能实现比如我一台远程服务器,加了端口的,如果要实现在SQL登录的时候,使用计算机名来 ...
随机推荐
- 算法笔记_060:蓝桥杯练习 出现次数最多的整数(Java)
目录 1 问题描述 2 解决方案 1 问题描述 问题描述 编写一个程序,读入一组整数,这组整数是按照从小到大的顺序排列的,它们的个数N也是由用户输入的,最多不会超过20.然后程序将对这个数组进行统 ...
- Php如何返回json数据
php返回json,xml,JSONP等格式的数据 返回json数据: header('Content-Type:application/json; charset=utf-8'); $arr = a ...
- Vue学习小结
ES6 let完全可以取代var const声明一个只读的常量 箭头函数:可以绑定this对象,大大减少了显式绑定this对象的写法(call.apply.bind) 函数绑定(function bi ...
- 【SpringMVC学习01】宏观上把握SpringMVC框架
springmvc是一个基于mvc的web框架,是spring框架的一个模块,所以springmvc和spring无需通过中间整合层进行整合.我们先来看下spring的一个架构模型,看springmv ...
- 微信小程序挑一挑辅助
1.窗体 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;usi ...
- 转:数据库的快照隔离级别(Snapshot Isolation)
数据库的快照隔离级别(Snapshot Isolation) 隔离级别定义事务处理数据读取操作的隔离程度,在SQL Server中,隔离级别只会影响读操作申请的共享锁(Shared Lock),而 ...
- HTTP 状态码总结 (HTTP Status Codes)
今天与同事聊天中提及到HTTP状态码的问题,突然发现工作这么些年对这个天天打交道的东西也没有一个详细的了解.日常最常见的状态码莫过于500和404了,几乎从事IT的应该都知道或许不从事的都知道,呵呵! ...
- How to fix Cannot change version of project facet Dynamic Web Module to 3.0 Error in Eclipse---转载
How to fix Cannot change version of project facet Dynamic Web Module to 3.0 Error in Eclipse 原文:http ...
- unity5, UGUI刺穿问题解法
我希望在touch屏幕时player起跳,于是在playerControl.cs的Update函数中添加如下touch代码: if (Input.GetMouseButtonDown (0)) {/ ...
- NGUI中获取鼠标在控件内部坐标
在UIWidget 中添加以下函数.获得的坐标系是以右上角为原点坐标,x轴向左,一轴向下. public Vector2 GetTouchPoint() { Vector3 p0 = cachedT ...