Page 1 of 1
need help regarding connection...
Posted: Fri Sep 17, 2004 3:22 am
by itsmani1
Code: Select all
$server = "localhost";
$username = "mysql_user";
$password = "";
$db = "temp";
$link = mysql_connect($server, $username ,$password) or die("Could not connect: " . mysql_error());
mysql_select_db($db) or die(mysql_error());
in above code passowrd field is blank, if i put password what will happen and moreover if i use password wot will be its effect? and same quetion about username? if i change it?
2nd thing i wana know that if i upload this connection file is there any need to made any change in this code remember:
Databse is Temp
I m using phptriad2-2-1
and my last question is can i use php5's code on it? will it work for it?
Posted: Fri Sep 17, 2004 3:25 am
by feyd
I don't understand your questions, at all.
Posted: Fri Sep 17, 2004 3:32 am
by itsmani1
feyd wrote:I don't understand your questions, at all.
this is the question abt above code?
in above code passowrd field is blank, if i put password what will happen and moreover if i use password wot will be its effect? and same quetion about username? if i change it?
got it wot i mean?
Posted: Fri Sep 17, 2004 3:40 am
by feyd
repeating your questions don't help me understand what you're actually trying to ask.
Posted: Fri Sep 17, 2004 3:45 am
by itsmani1
Code: Select all
<?php
$server = "localhost";
$username = "mysql_user";
$password = "";
$db = "temp";
$link = mysql_connect($server, $username ,$password) or
die("Could not connect: " . mysql_error());
mysql_select_db($db) or die(mysql_error());
?>
this code of my connection file. did u got wot i mean till now? if yes then ...
u can see $password = ""; now wot i want is i want to set some value against password like this $password = "1111"; tell me will it work?
if not then Y?
Posted: Fri Sep 17, 2004 3:53 am
by feyd
having the password set is entirely up to your mysql server's permissions and settings for the user. So, it could work. It entirely depends on the user's settings.
Posted: Fri Sep 17, 2004 4:12 am
by itsmani1
feyd wrote:having the password set is entirely up to your mysql server's permissions and settings for the user. So, it could work. It entirely depends on the user's settings.
how can i change permissions?????
Posted: Fri Sep 17, 2004 4:12 am
by feyd
you'd need administrator/root access on the mysql server.
Posted: Fri Sep 17, 2004 4:14 am
by itsmani1
m using win2k not linux
????????????????
Posted: Fri Sep 17, 2004 4:15 am
by feyd
same answer.. you need a superuser account in mysql to change the permissions of any other users mysql has.