Page 1 of 1

database link

Posted: Tue Oct 20, 2009 10:53 am
by jd57
Hi Everyone

I been trying to set a server on my computer and I'm very close to make it work, but I have a problem with link to my database.
On the script I use the following:

Code: Select all

$connection = mysql_connect('localhost','internb7_jxxx','xxxx') or die ("Couldn't connect to server."); 
$db = mysql_select_db('internb7_reg', $connection) or die ("Couldn't select database.");
Now I'm using a locathost with database name internb7 table ihsreg, I'm not using a user or password, what is the code to replace to be able to link to my database?

Re: database link

Posted: Tue Oct 20, 2009 11:06 am
by dhenick
the default installation for mysql database is no password,
if you want to link database connection may be you can try

Code: Select all

 
$connection = mysql_connect("localhost","root","")or die(mysql_error());
$db_select =mysql_select_db('internb7_reg', $connection) or die ("Couldn't select database.");
 

Re: database link

Posted: Tue Oct 20, 2009 11:13 am
by jd57
thank you so much