Hi,

How i can access MySQL through PHP. My Apache webserver is working and i can
run PHP  Scripts. (eg: http://127.0.0.1/phpinfo.php). I tyed a simple
script, but it fails.

$cnx = mysql_connect("localhost","root","rootpassword");

This fails. After i remove the password it is getting connected. [ie  $cnx =
mysql_connect("localhost","root"); ] But it fails to select database.

$db  = mysql_select_db("test",$cnx);   /*  This Fails  */

How i create username and password in mysql.

I typed mysql in console as root. It go to mysql> prompt without asking
anything. When i enter "show databases" command two databases namely "mysql"
and "test" are listed. I enter "use test" and create a table in test.

On PHP "phpinfo()" Configure Command says no mysql.

Please help.

Regards,
Boby



_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to