| |||
![]() bueno mi pregunta es como se debe configurar correctamente mysql para que desde un script en php colocado en mi hosting pueda mostrar datos de una database en mi pc espero que allan comprendido espero una repuestas gracias de antemano... |
| |||
Respuesta: PHP & MySQL $hostname_bd = "192.168.nn.nnn:3306"; $database_bd = "nombre"; $username_bd = "usuario"; $password_bd = "pass"; $bd = mysql_pconnect($hostname_bd, $username_bd, $password_bd) or trigger_error(mysql_error(),E_USER_ERROR); mysql_select_db($database_bd, $bd); entiendo que la base de datos es remota asegurate de añadir al usuario en mysql y dale los permisos correspondientes saludines!!1
__________________ WHERE IS MY BLUE SUNNY SKY?? pd: todos los karmas son bienvenidos :D |
| |||
Respuesta: PHP & MySQL exelente lo que respondio mi amigo harvestmoon pero eso siempro lo ago pero lo delos permisos se los asignos a un use pero nunca se conecta siempre muere la coneccion aguna idea de que pueda ser? |
| |||
Respuesta: PHP & MySQL muere la conexion? te marca algun error ou por q no intentas aumentar el tiempo de ejecucion en tus sript esta en el php.ini saludines!!
__________________ WHERE IS MY BLUE SUNNY SKY?? pd: todos los karmas son bienvenidos :D |
| |||
Respuesta: PHP & MySQL y el mysql_error() que te muestra algun codigo de error? de autentificacion te dice algo del password o del user manda todo lo q marke saludines!! exito!
__________________ WHERE IS MY BLUE SUNNY SKY?? pd: todos los karmas son bienvenidos :D |
| |||
Respuesta: PHP & MySQL bueno es un script prefrabicado lo unico que me pide es una base de datos un usuario un host no coloco la database en el hosting porque corre de la mano con una aplicacion la cual exige una gran cantidad de recursos. el error que dise es qu no se conecta con la base de datos
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 ?> |
| |||
Respuesta: PHP & MySQL $ls_host = '190.207.153.97'; doble comilla y no le has puesto el puerto por el cual debe entrar saludines!
__________________ WHERE IS MY BLUE SUNNY SKY?? pd: todos los karmas son bienvenidos :D |