Foros del Web » Programando para Internet » PHP »

Consultas externas a mysql

Estas en el tema de Consultas externas a mysql en el foro de PHP en Foros del Web. bueno lo que estoy intentando hacer es colocar scipts php en mis hosting y hacer consultas a mysql q esta en mi pc pero no ...
  #1 (permalink)  
Antiguo 12/04/2009, 08:37
 
Fecha de Ingreso: septiembre-2008
Mensajes: 101
Antigüedad: 15 años, 7 meses
Puntos: 4
Consultas externas a mysql

bueno lo que estoy intentando hacer es colocar scipts php en mis hosting y hacer consultas a mysql q esta en mi pc pero no logro hacerlo funcionar si alguien mi indica la forma correcta y los programas nesesarios para realizarlo gracias de antemano
  #2 (permalink)  
Antiguo 12/04/2009, 08:56
Avatar de huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: Consultas externas a mysql

Requieres de php y mysql y un servidor web. (El mas común y compatible es apache)

En el siguiente enlace te explican como hacer la conexión y como mostrar los datos mostrados.

http://blog.unijimpe.net/conectar-php-con-mysql/

Espero te sirva.

Un saludo
__________________
Without data, You are another person with an opinion.
W. Edwads Deming
  #3 (permalink)  
Antiguo 12/04/2009, 09:56
 
Fecha de Ingreso: septiembre-2008
Mensajes: 101
Antigüedad: 15 años, 7 meses
Puntos: 4
Respuesta: Consultas externas a mysql

se eso lo se pero lo que no logro es que logre conectar con la db que se encuentra en mi pc siempre me dise q no se pudo conectar con la db
  #4 (permalink)  
Antiguo 12/04/2009, 10:01
Avatar de huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: Consultas externas a mysql

Detallas muy poco tu problema.
Que es lo que haces y no te funciona?
Donde te muestra errores?
__________________
Without data, You are another person with an opinion.
W. Edwads Deming
  #5 (permalink)  
Antiguo 12/04/2009, 10:04
 
Fecha de Ingreso: septiembre-2008
Mensajes: 101
Antigüedad: 15 años, 7 meses
Puntos: 4
Respuesta: Consultas externas a mysql

http://www.l2low.com/cuentas

ese es un script que crea cuentas en la db pero como puedes ver no se conecta pide un user y una pass ya lo cree el cual tiene acceso desde la ip de mi servidor de hosting pero = no permite la coneccion
  #6 (permalink)  
Antiguo 12/04/2009, 10:25
Avatar de huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: Consultas externas a mysql

Arkang31

Eso que pusiste no muestra nada. Muestra un formulario y ya.
Seguro tu servidor de mysql esta activo?
De que forma haces la conexión entre tu lenguaje de programación y mysql?
Que funciones usas para conectarte?
En que parte pones la ip del servidor?

Son muchas las cosas que pueden estar pasando y es imposible detectarlo con un formulario.

Te recomiendo, te tomes un tiempo para detallar claramente tu situación, todo lo que haces, el código que utilizas, y lo comentes acá mas detallado.

Un saludo
__________________
Without data, You are another person with an opinion.
W. Edwads Deming
  #7 (permalink)  
Antiguo 12/04/2009, 10:29
 
Fecha de Ingreso: septiembre-2008
Mensajes: 101
Antigüedad: 15 años, 7 meses
Puntos: 4
Respuesta: Consultas externas a mysql

es una especie de script automatizado lo unico que me pide es el user de mis database mi host y mi pass aqui esta el codigo de connecion

Código:
 <?php

defined( '_ACM_VALID' ) or die( 'Direct Access to this location is not allowed.' );

define ('DEBUG', false);								// Enable debug mode ; for set on replace false by true
define ('LOG', false);									// Enable log mode ; for set off replace true by false

//	#	Login Server Configuration

$ls_host		= '190.207.153.97';							// login host database DB
$ls_user		= 'arkang31';								// login user
$ls_pass		= '1234';									// login password
$ls_db			= 'l2jdb';								// login database name

//	#	Game Server Configuration

$id = 1;												// Id of the game server
$gs_host[$id]	= '190.207.153.97';							// game host database DB
$gs_user[$id]	= 'arkang31';								// game user
$gs_pass[$id]	= '1234';									// game password
$gs_db[$id]		= 'l2jdb';								// game database name

/**

Copy line under this text for add a new world. The id need to be same as the id registred into gameservers table.

$id = 2;												// Id of the game server
$gs_host[$id]	= 'localhost';							// game host database DB
$gs_user[$id]	= 'root';								// game user
$gs_pass[$id]	= '';									// game password
$gs_db[$id]		= 'l2jdb';								// game database name

*/

//	#	Web Configuration

$server_name	= 'Private Server';						// server name
$email_from		= '[email protected]';					// Specify an adress email source

$act_img		= true;									// Activate image verification ; set false if you want desactivate
$act_email		= true;									// Activate email verification ; set false if you want desactivate

$acc_limit		= false;								// How many account can be registered ; set false for unlimited

$same_email		= false;								// Allowed same email for different account ; set false if you want prohibit

$id_limit		= 15;									// Limit id characters
$pwd_limit		= 15;									// Limit pwd characters

$language		= 'english';							// language use by Account Manager :: name of language file in language folder

$can_chg_email	= false;								// User can change email ; set false if you want prohibit (If there are no email registered. Option is avaible same if you have set prohibited)

$ack_cond		= false;								// User must accept before register :: conditions can be edited on language file

$template		= 'kamael';								// template directory


//#####################
//# Characters Config #
//#####################

// Don't use those settings for now keep to false please

$allow_char_mod				= false;					// Enable characters mod
$allow_account_services		= false;					// Enable Account services feature (change name and gender) for offline character
$time_account_services		= 7;						// Need to wait 7 days after change gender before to change another time for the same or another character
$item_female_only			= array(8559,8913,8917);	// Check female-use only items before to change gender
$item_male_only				= array(8923);				// Check male-use only items before to change gender
$name_regex	= '`^[[:alnum:]]{3,16}$`';					// allow alphanumeric character in char name (3-16 char.)

$allow_fix					= false;					// Enable fixing feature for offline character
$allow_unstuck				= false;					// Enable unstuck feature for offline character
$time_fix					= 24;						// Need to wait 24 hours before to use fix or unstuck against
$coord_static				= false;					// Use static coords when using unstuck and fix feature
$coord_default				= array(0,0,0);				// When coord static enable tp player to the coords (x,y,z)

//###################
//# Advanced Config #
//###################

$smtp['use']		= false;							// Set to true if you want use an smtp server
$smtp['address']	= 'smtp.server.com';				// Address of the smtp server
$smtp['port']		= 25;								// Port of the smtp server
$smtp['login']		= '';								// login of the smtp server if you need authentication
$smtp['password']	= '';								// password of the smtp server if you need authentication
$smtp['domain']		= '';								// domain of your host

$id_regex	= '`^[[:alnum:]]{4,'.$id_limit.'}$`';		// allow alphanumeric character in login name and login character min needed is 4
$pwd_regex	= '`^[[:alnum:]@\\\/]{4,'.$pwd_limit.'}$`';	//allow alphanumeric character and \ / @ in password and pwd character min needed is 4

?>
funciona bien en local hace todo

Última edición por arkang31; 12/04/2009 a las 10:38
  #8 (permalink)  
Antiguo 12/04/2009, 16:52
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 11 meses
Puntos: 2135
Respuesta: Consultas externas a mysql

Tema trasladado desde MySQL

http://www.forosdelweb.com/f21/funci...-datos-413499/
  #9 (permalink)  
Antiguo 12/04/2009, 16:56
 
Fecha de Ingreso: septiembre-2008
Mensajes: 101
Antigüedad: 15 años, 7 meses
Puntos: 4
Respuesta: Consultas externas a mysql

alguien tiene idea? que puede ser ??? mi proveedor de hosting o estoy configurando mal el user ?? ayuda porfavor
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 20:10.