June 21, 200619 yr comment_3293 Perdon, pero mi inglés es malísimo.Por eso agradeceria una contestación es Spanish.He instalado el UniforServer, y el Apache me funciona perfectamente. Sin embargo, no consigo conectar con la Base de Datos. Realizo la conexión así: <?$sql_host="localhost"; // Host$sql_usuario="root"; // Usuario de Mysql, según la tabla "user" de mysql$sql_pass="67457e226a15bd"; // contraseña de Mysql, según la tabla "user" de mysql $sql_db="datos"; // Base de datos que se usará.$sql_tabla="direcciones"; // Nombre de la tabla que contendrá los datos de los usuarios $db_conexion= mysql_connect("$sql_host", "$sql_usuario", "$sql_pass") or die("No se pudo conectar a la Base de datos") or die(mysql_error());mysql_select_db("$sql_db") or die(mysql_error());?> Me da un error, como que no se puede conectar a la Base de datos. Si edito el htaccess, aparece lo siguiente:-------------------------------------# This file provides security to the server limiting access to the localhost only. # Comment to deactivate. Order Deny,AllowDeny from allAllow from 127.0.0.1 # To disallow execution of cgi scripts in this directory comment next two lines. AddHandler cgi-script .bat .exe .pl .cgiOptions +ExecCGI # To unlock Admin Panel, comment the next 4 lines.# Defaults: Username - admin; Password - userver #AuthName "Uniform Server - Admin Panel 1.0 Alpha"#AuthType Basic#AuthUserFile /htpasswd/home/admin/www/.htpasswd#Require valid-user----------------------------------------- Si intento conectar con : <?$sql_host="localhost"; // Host$sql_usuario="Admin"; // Usuario de Mysql$sql_pass="userver"; // contraseña de Mysql $sql_db="datos"; // Base de datos que se usará.$sql_tabla="user"; // Nombre de la tabla que contendrá los datos de los usuarios $db_conexion= mysql_connect("$sql_host", "$sql_usuario", "$sql_pass") or die("No se pudo conectar a la Base de datos") or die(mysql_error());mysql_select_db("$sql_db") or die(mysql_error());?> me sigue dando el mismo error. ¿Alguna ayuda?. Ya no sé como conectar con la base de datos.Nota: Antes usaba EasyPHP y me funcionaba perfectamente. Report
June 22, 200619 yr comment_3298 No como espanol.... Can you please try and use a free translanting tool as this computer does not have one.... Thanks so much. Can anyone please help translate? Best Regards Olajide Olaolorun The Uniform Server Development Team Report
June 22, 200619 yr Author comment_3312 I will try to translate:I have installed the UniforServer, and the Apache works to me perfectly. Nevertheless, with himself not to connect with Base de Datos.I make the connection thus: <?$sql_host="localhost"; // Host$sql_usuario="root"; // Usuario de Mysql, según la tabla "user" de mysql$sql_pass="67457e226a15bd"; // contraseña de Mysql, según la tabla "user" de mysql $sql_db="datos"; // Base de datos que se usará.$sql_tabla="direcciones"; // Nombre de la tabla que contendrá los datos de los usuarios $link = mysql_connect($sql_host, $sql_usuario,$sql_pass) or die("It was not possible to be connected to Base of data") or die(mysql_error());mysql_select_db($sql_db, $link) or die(mysql_error());?> It gives an error me, because it is not possible to be connected to Base of data: "Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in W:\www\entrar.php on line 21It was not possible to be connected to Base of data" -------------------------------------------------------- If I publish htaccess, appears the following thing: # This file provides security to the server limiting access to the localhost only.# Comment to deactivate. Order Deny,AllowDeny from allAllow from 127.0.0.1 # To disallow execution of cgi scripts in this directory comment next two lines. AddHandler cgi-script .bat .exe .pl .cgiOptions +ExecCGI # To unlock Admin Panel, comment the next 4 lines.# Defaults: Username - admin; Password - userver #AuthName "Uniform Server - Admin Panel 1.0 Alpha"#AuthType Basic#AuthUserFile /htpasswd/home/admin/www/.htpasswd#Require valid-user----------------------------------------- If I make this connection, also it gives error me: <?$sql_host="localhost"; // Host$sql_usuario="Admin"; // Usuario de Mysql$sql_pass="userver"; // contraseña de Mysql $sql_db="datos"; // Base de datos que se usará.$sql_tabla="user"; // Nombre de la tabla que contendrá los datos de los usuarios connect with Base de Datos.I make the connection thus: <?$sql_host="localhost"; // Host$sql_usuario="root"; // Usuario de Mysql, según la tabla "user" de mysql$sql_pass="67457e226a15bd"; // contraseña de Mysql, según la tabla "user" de mysql $sql_db="datos"; // Base de datos que se usará.$sql_tabla="direcciones"; // Nombre de la tabla que contendrá los datos de los usuarios $link = mysql_connect($sql_host, $sql_usuario,$sql_pass) or die("No se pudo conectar a la Base de datos") or die(mysql_error());mysql_select_db($sql_db, $link) or die(mysql_error());?> !Help!. No longer I know as to connect with the data base. Note: Before EasyPHP used and it worked to me perfectly. Report
June 24, 200619 yr comment_3330 Have you started mySQL? (I don't know about other WAMP distributions, but by default, Uniform Server doesn't start mySQL when you click on Server_Start.bat) If you have, maybe you should try using "127.0.0.1" instead of "localhost".If not, you can start it via the admin panel or by executing "Server_Start.bat w mysql". Report
June 24, 200619 yr Author comment_3335 Have you started mySQL? Yes. I have starded mySQL from the Admin Panel. I am going to prove with 127.0.0.1. Thanks. Report
June 26, 200619 yr Author comment_3347 It does not work with Does lack algun Driver? It does not work with 127.0.0.1 Does lack algun Driver for windows XP? Report
June 29, 200619 yr Author comment_3382 Yes. I can create DB, even insert registries, etc. But I cannot make connection. I feel much, because UniformServer is very easy to use. Report
July 3, 200619 yr Author comment_3401 You one talks about, for example, to the version Uniform Server 2.8? Report
July 3, 200619 yr comment_3404 If you can connect using apanel you have no problem! UniServer 3,3Defaults name=rootpassword=root example code: MySQL Test MySQL test <?php mysql_connect("localhost", "root", "root"); if (mysql_select_db("phpmyadmin")){ echo "CAN connect to database"; } else{ echo "CAN NOT connect to database"; } ?> Hope that helps Report
July 4, 200619 yr Author comment_3422 Thank you very much Ric. Already I connect with password "root". I have one doubts: in PhpMyAdmin, in DB "mysql", table "user", the USER="root" and the PASSWORD="67457e22ã1a15bd". Porqué connects to me with Password="root"? Report
July 4, 200619 yr comment_3423 Now I see what's wrong Why didn't I realize that you had the wrong password in $sql_pass earlier "67457e22ã1a15bd" is "root" encrypted, you shouldn't use the encrypted password to connect to mySQL Edited July 4, 200619 yr by MrX Report
July 4, 200619 yr comment_3426 Internal password:The MySQL password 67457e226a1a15bd contained in the table user is not the external password.When privileges were set for user root the password was entered in as text “root” MySQL converted this into that long number for internal use. External password:From PHP $dbuser = 'root' is sent to your MySQL database where it is converted into a number and matched against the internal number (67457e226a1a15bd). Access is allowed because the numbers match. From PHP if $dbuser = '67457e226a1a15bd' this number (text) is sent to MySQL converted into a number that will not match against the internal number for root. Access is denied because the numbers do not match. Online: When you are on line MySQL listens for any requests and accepts any with user=root and password=root these are the default settings. To prevent external access to root you need to change the root password in MySQL. Run apanel: http://localhost/apanel/ Click on: phpMyAdmin Click on: Privileges To the right of root click on Edit privilegesScroll down to: Change password Tick the radio button: PasswordEnter your passwordEnter your password againClick on Go. Doing this will also prevent access using apanel. You need to change the password contained in the file mysql_passwordLocated in folder: \diskw\home\admin\wwwTo match the one you set in MySQL privileges. Report
July 6, 200619 yr Author comment_3440 Ok, Ok! This it is my problem. Now, Uniforserver works perfectly. I did not have the news that MySQL encripta the Password (root=67457e226a1a15bd) Thank you very much to Ric and MrX Report
July 9, 200619 yr comment_3473 I was just about to say that... Thanks Ric.... Best Regards Olajide Olaolorun The Uniform Server Development Team Report
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.