By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,805 Members | 1,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,805 IT Pros & Developers. It's quick & easy.

How to connect?

P: n/a
Let's say I got

$db_name = "your_database";
$username = "your_user";
$password = "your_MySQL_password";

I'm not sure about

$db_server = "mysql.server.com";

Although I got a domain name. How to find out what is SQL hostname?
If I had that hostname, would that be enough to connect to the mySQL
database (if I dont got access to the server itself, i.e. no FTP access or
similar)

Thanks in advance
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Thu, 16 Dec 2004 23:02:58 +0100, "Dakky" <NO*********@hi.htnet.hr> wrote:
Let's say I got

$db_name = "your_database";
$username = "your_user";
$password = "your_MySQL_password";

I'm not sure about

$db_server = "mysql.server.com";

Although I got a domain name. How to find out what is SQL hostname?
Ask your host.
If I had that hostname, would that be enough to connect to the mySQL
database (if I dont got access to the server itself, i.e. no FTP access or
similar)


It depends. Whether you're on the right side of a firewall. Whether there's a
database listening at all. And so on...

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2

P: n/a
"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:tv********************************@4ax.com...
Although I got a domain name. How to find out what is SQL hostname?
Ask your host.


Let's say my host is theplanet.com and I really don't want to wait days to
get response so could you please tell me if you know...
It depends. Whether you're on the right side of a firewall. Whether there's a database listening at all. And so on...


Understand...
Jul 17 '05 #3

P: n/a
.oO(Dakky)
Let's say I got

$db_name = "your_database";
$username = "your_user";
$password = "your_MySQL_password";

I'm not sure about

$db_server = "mysql.server.com";

Although I got a domain name. How to find out what is SQL hostname?


In many cases the database runs on the same machine as the webserver, so
you can simply connect to 'localhost'. Try that.

Micha
Jul 17 '05 #4

P: n/a
JV
Dakky wrote:
I'm not sure about
$db_server = "mysql.server.com";
Although I got a domain name. How to find out what is SQL hostname?
If I had that hostname, would that be enough to connect to the mySQL
database (if I dont got access to the server itself, i.e. no FTP access or
similar)


ultimately andy is correct that you should consult the persons hosting
the site (if its virtual site or not).

if you have shell access to the server to modify your code... can you
use the prompt db client 'mysql' if so the chances are its on the
'localhost'
else if you have to enter a -h flag for the command its most likely else
where and thats the db's address

if you do not have shell access (ssh, ftp, telnet...etc) (?how are you
writing the code files) then you best bet is just to try 'localhost'
first then try 'yourdomain.com' just in case access is disabled from the
localhost.

.... will expound on request.

hth
JV
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.