Re: Connection Help - Stupid Question, sorry to bother.

2006-08-13 Thread Chris

Chris W wrote:
By default MySQL uses port 3306 so you need to be sure that port is open 
on the server, and not blocked by a firewall.  You also need to be sure 
the user you are trying to login as can login remotely.  In the MySQL 
user data base, there is a column for host which is the host that user 
can login from.  If that host says localhost you can only login from the 
localhost.  If it says % you can login from any host.  Also note there 
can be more than one entry for each user all with a different host.  It 
is best to only set it up so you can login from a specific host, that 
makes it more difficult for a hacker to break in. If the user you are 
logging in as is set up just for localhost I would add a user and use 
the host you plan to login from if you can, other wise just change the 
host to % then you can login from anywhere.  Also if you do an update to 
the user table, using the sql update command, you also need to execute 
flush privileges for the changes to take effect.


The other thing is that mysql has to be set up to allow remote 
connections, it's not by default on some systems (eg debian).


Check the my.cnf and make sure there is no 'skip-networking'.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Connection Help - Stupid Question, sorry to bother.

2006-08-12 Thread Chris W
By default MySQL uses port 3306 so you need to be sure that port is open 
on the server, and not blocked by a firewall.  You also need to be sure 
the user you are trying to login as can login remotely.  In the MySQL 
user data base, there is a column for host which is the host that user 
can login from.  If that host says localhost you can only login from the 
localhost.  If it says % you can login from any host.  Also note there 
can be more than one entry for each user all with a different host.  It 
is best to only set it up so you can login from a specific host, that 
makes it more difficult for a hacker to break in. If the user you are 
logging in as is set up just for localhost I would add a user and use 
the host you plan to login from if you can, other wise just change the 
host to % then you can login from anywhere.  Also if you do an update to 
the user table, using the sql update command, you also need to execute 
flush privileges for the changes to take effect.


Sana Farshidi wrote:


Hi,
Im sure this is a stupid problem but im a bit confused, and some 
assistance

would be greatly appreciated.

Im trying to assist with the maintenance/updating of a php site for a 
school

which uses mysql, and is allready up and running on a remote server.
I have the ftp username and password, and i can access the php/html 
side of

things no problems, but i want to connect to the mysql database on the
server, and as stupid as it sounds, i have no idea how to go about
connecting.
Ive used mysql before, not very efficiently, but never have had to set it
up, i was always told the program and connection details.

I downloaded a mysql program (enginsite MySql client) and tried to 
connect

but am not having any luck and have no idea what the port is supposed to
be...

the detail i have are: (of course ive undisclosed the username/passwords)

DOMAIN ACCOUNT DETAILS
Domain Name: www.mhmcindia.org

FTP DETAILS
Host Name / IP Address: 216.67.234.167 or ftp.mhmcindia.org
username: 
password: 

and the PHP connects through the script (on the remote server of course)
$host="localhost";
$username="";
$password="";
$db="";

$link = mysql_connect($host, $username,$password)
   or die("Could not connect : " . mysql_error());

mysql_select_db($db) or die("Could not select database");

Is there anyway i can connect to the mysql database with these 
details? if

so how?

Im sorry for asking seemingly obvious questions, but some assistance 
would

be greatly appreciated.

Thanks,
Sana




--
Chris W
KE5GIX

Gift Giving Made Easy
Get the gifts you want & 
give the gifts they want
One stop wish list for any gift, 
from anywhere, for any occasion!

http://thewishzone.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Connection Help - Stupid Question, sorry to bother.

2006-08-12 Thread Sana Farshidi

Hi,
Im sure this is a stupid problem but im a bit confused, and some assistance
would be greatly appreciated.

Im trying to assist with the maintenance/updating of a php site for a school
which uses mysql, and is allready up and running on a remote server.
I have the ftp username and password, and i can access the php/html side of
things no problems, but i want to connect to the mysql database on the
server, and as stupid as it sounds, i have no idea how to go about
connecting.
Ive used mysql before, not very efficiently, but never have had to set it
up, i was always told the program and connection details.

I downloaded a mysql program (enginsite MySql client) and tried to connect
but am not having any luck and have no idea what the port is supposed to
be...

the detail i have are: (of course ive undisclosed the username/passwords)

DOMAIN ACCOUNT DETAILS
Domain Name: www.mhmcindia.org

FTP DETAILS
Host Name / IP Address: 216.67.234.167 or ftp.mhmcindia.org
username: 
password: 

and the PHP connects through the script (on the remote server of course)
$host="localhost";
$username="";
$password="";
$db="";

$link = mysql_connect($host, $username,$password)
   or die("Could not connect : " . mysql_error());

mysql_select_db($db) or die("Could not select database");

Is there anyway i can connect to the mysql database with these details? if
so how?

Im sorry for asking seemingly obvious questions, but some assistance would
be greatly appreciated.

Thanks,
Sana