安装/配置
PHP 手册

运行时配置

这些函数的行为受 php.ini 的影响。

MySQLi 配置选项
名称 默认值 可修改范围 更新日志
mysqli.max_links "-1" PHP_INI_SYSTEM 自 PHP 5.0.0 起可用。
mysqli.default_port "3306" PHP_INI_ALL 自 PHP 5.0.0 起可用。
mysqli.default_socket NULL PHP_INI_ALL 自 PHP 5.0.0 起可用。
mysqli.default_host NULL PHP_INI_ALL 自 PHP 5.0.0 起可用。
mysqli.default_user NULL PHP_INI_ALL 自 PHP 5.0.0 起可用。
mysqli.default_pw NULL PHP_INI_ALL 自 PHP 5.0.0 起可用。

以上 PHP_INI_* 常量的进一步细节及定义,见怎样修改配置设定一节。

以下是配置选项的简要解释。

每个进程的 MySQL 连接的最大数目。

mysqli.default_port string

The default TCP port number to use when connecting to the database server if no other port is specified. If no default is specified, the port will be obtained from the MYSQL_TCP_PORT environment variable, the mysql-tcp entry in /etc/services or the compile-time MYSQL_PORT constant, in that order. Win32 will only use the MYSQL_PORT constant.

mysqli.default_socket string

The default socket name to use when connecting to a local database server if no other socket name is specified.

mysqli.default_host string

The default server host to use when connecting to the database server if no other host is specified. Doesn't apply in safe mode.

mysqli.default_user string

The default user name to use when connecting to the database server if no other name is specified. Doesn't apply in safe mode.

mysqli.default_pw string

The default password to use when connecting to the database server if no other password is specified. Doesn't apply in safe mode.


安装/配置
PHP 手册