Foros del Web » Programando para Internet » PHP »

configuracion mysqli

Estas en el tema de configuracion mysqli en el foro de PHP en Foros del Web. Hola escribo este post por que quisiera insatalar mysqli, bueno al parecer ya lo tengo instalado por que me aparece en phpinfo esto: mysqli Client ...
  #1 (permalink)  
Antiguo 25/09/2011, 14:22
 
Fecha de Ingreso: marzo-2009
Mensajes: 26
Antigüedad: 15 años
Puntos: 0
configuracion mysqli

Hola escribo este post por que quisiera insatalar mysqli, bueno al parecer ya lo tengo instalado por que me aparece en phpinfo esto:

mysqli

Client API library version 5.5.9
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 0
Client API header version 5.5.9
MYSQLI_SOCKET /Applications/MAMP/tmp/mysql/mysql.sock

Directive Local Value Master Value
mysqli.allow_local_infile On On
mysqli.allow_persistent On On
mysqli.default_host no value no value
mysqli.default_port 3306 3306 Cambiar por 8889
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.max_persistent Unlimited Unlimited
mysqli.reconnect Off Off

Ahora lo que quisiera hacer es cambiar el puerto 3306 al 8889 que es el que esta configurado en el MAMP para que me reconozca el mysqli.

Estoy utlizando:
Sistema: MAC OS X V: 10.6.8
Servidor: MAMP

Si me pudieran ayudar de antemano muchas gracias.
  #2 (permalink)  
Antiguo 25/09/2011, 16:03
Avatar de Ronruby  
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 8 meses
Puntos: 416
Respuesta: configuracion mysqli

Debes cambiar la configuración de tu php.ini, busca las siguientes lineas:
Código:
; Default port number for mysqli_connect().  If unset, mysqli_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
; at MYSQL_PORT.
; http://php.net/mysqli.default-port
mysqli.default_port = 3306
  #3 (permalink)  
Antiguo 25/09/2011, 16:30
 
Fecha de Ingreso: marzo-2009
Mensajes: 26
Antigüedad: 15 años
Puntos: 0
Respuesta: configuracion mysqli

Gracias por su pronta respuesta pero mira ya busque esas lineas pero no me apareces nada sobre mysqli solamente de mysql mira te pongo lo que me aparece:

Cita:
; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
; at MYSQL_PORT.
mysql.default_port =

; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysql.default_socket = /Applications/MAMP/tmp/mysql/mysql.sock

; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =

; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =
sera que lo tengo que agregar o algo asi, si es asi me podrias mostrar como hacerlo
Gracias
  #4 (permalink)  
Antiguo 25/09/2011, 17:22
Avatar de Ronruby  
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 8 meses
Puntos: 416
Respuesta: configuracion mysqli

Te voy a mostrar la configuración que tengo en mi php.ini en cuanto a MySQLi
Código:
[MySQLi]

; Maximum number of persistent links.  -1 means no limit.
; http://php.net/mysqli.max-persistent
mysqli.max_persistent = -1

; Allow accessing, from PHP's perspective, local files with LOAD DATA statements
; http://php.net/mysqli.allow_local_infile
mysqli.allow_local_infile = On

; Allow or prevent persistent links.
; http://php.net/mysqli.allow-persistent
mysqli.allow_persistent = On

; Maximum number of links.  -1 means no limit.
; http://php.net/mysqli.max-links
mysqli.max_links = -1

; If mysqlnd is used: Number of cache slots for the internal result set cache
; http://php.net/mysqli.cache_size
mysqli.cache_size = 2000

; Default port number for mysqli_connect().  If unset, mysqli_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
; at MYSQL_PORT.
; http://php.net/mysqli.default-port
mysqli.default_port = 3306

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
; http://php.net/mysqli.default-socket
mysqli.default_socket = "MySQL"

; Default host for mysql_connect() (doesn't apply in safe mode).
; http://php.net/mysqli.default-host
mysqli.default_host =

; Default user for mysql_connect() (doesn't apply in safe mode).
; http://php.net/mysqli.default-user
mysqli.default_user =

; Default password for mysqli_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
; and reveal this password!  And of course, any users with read access to this
; file will be able to reveal the password as well.
; http://php.net/mysqli.default-pw
mysqli.default_pw =

; Allow or prevent reconnect
mysqli.reconnect = Off
  #5 (permalink)  
Antiguo 25/09/2011, 17:38
 
Fecha de Ingreso: marzo-2009
Mensajes: 26
Antigüedad: 15 años
Puntos: 0
De acuerdo Respuesta: configuracion mysqli

He copiado la configuracion que tienes y la he anexado a mi archivo php.ini cambiandole el puerto y mi problema se soluciono.

Muchas gracias por tu ayuda

Etiquetas: mamp, mysqli, puerto
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:21.