473,434 Members | 1,451 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

Cannot connect to localhost using GoDaddy

I'm (trying) to help a friend setup a MySQL db and use some simple
scripts on a site hosted with GoDaddy. I note that GoDaddy appears to
use Microsoft. I have done this:

$connection = mysql_connect("localhost","mydatabase","password")
or die ("Couldn't connect to server.");
$sql = mysql_query("SELECT * FROM dummy");
$row = mysql_fetch_array($sql);
echo $row['name'];
?>

on several Apache servers and it always seems to work. I created the
MySQL database using the GoDaddy control panel (which is very confusing
and poor IMO). I dove into phpAdmin and was able to do stuff. But I
can't get php to connect.

Is there something different I need to do for Microsoft servers?

Thanks,

Jul 17 '05 #1
2 6859
Dale wrote:
I'm (trying) to help a friend setup a MySQL db and use some simple
scripts on a site hosted with GoDaddy. I note that GoDaddy appears to
use Microsoft. I have done this:

$connection = mysql_connect("localhost","mydatabase","password")
or die ("Couldn't connect to server.");
$sql = mysql_query("SELECT * FROM dummy");
$row = mysql_fetch_array($sql);
echo $row['name'];
?>

on several Apache servers and it always seems to work. I created the
MySQL database using the GoDaddy control panel (which is very confusing
and poor IMO). I dove into phpAdmin and was able to do stuff. But I
can't get php to connect.

Is there something different I need to do for Microsoft servers?

Thanks,


Did you ask GoDaddy? The database may not be on your host. Check their
documentation.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 17 '05 #2
>I'm (trying) to help a friend setup a MySQL db and use some simple
scripts on a site hosted with GoDaddy. I note that GoDaddy appears to
use Microsoft. I have done this:

$connection = mysql_connect("localhost","mydatabase","password")
The second parameter to mysql_connect is a user name, not a database
name. Depending on how hosting companies assign these things, this
may not make any difference. Also, sometimes the host name that
works is the host name of the machine, NOT localhost (even if they
are the same machine), due to permissions setup. And sometimes the
database has its own machine.
or die ("Couldn't connect to server.");
$sql = mysql_query("SELECT * FROM dummy");
$row = mysql_fetch_array($sql);
echo $row['name'];
?>

on several Apache servers and it always seems to work. I created the
MySQL database using the GoDaddy control panel (which is very confusing
and poor IMO). I dove into phpAdmin and was able to do stuff. But I
can't get php to connect.

Is there something different I need to do for Microsoft servers?


I think you need to ask GoDaddy.

Gordon L. Burditt
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Krista | last post by:
Hi, I hope you guys can help me out~~~ when I run it localhost/config.php, it cannot display any message such as connect successfully or failed. Do u guys have any idea? config.php <html>...
4
by: bettina | last post by:
Hello, My domain: www.coaster.ch My database: coasters User: bettina In the programm I wrote: <?php $db_server = "www.coaster.ch";
0
by: Kyle Goetz | last post by:
hey, i'm new to mySQL...this meaning that i have tried ~10000 times to install it and get it working over the past few weeks...and it always gives me the same error (scroll further down to see it)...
22
by: James Kupernik | last post by:
Hello everyone! I'm hoping someone can shed some light on my ever daunting mysql/php problem. I'm currently trying to get a new server up and running using apache/php/mysql. Everything runs...
5
by: MLH | last post by:
I'm supposed to set a password for the MySQL root user. The output of mysql_install_db instructed me to run the following commands... /usr/bin/mysqladmin -u root -h appserver password mynwewpasswd...
2
by: Mondal | last post by:
Hi, I am using MySQL 5.0 beta and Active Python 2.4. I have the correct version of MySQLdb installed. The problem is that I can't connect to MySQL through the Active Python interactive window. ...
2
by: zMisc | last post by:
I am using VB.NET 1.1 and cannot connect to a MySQL (v5) database. I've done the following: 1) Create a DSN for MyODBC. 2) Connect using: Driver=MySQL ODBC 3.51 Driver; Server=localhost; Data...
4
by: Gourk | last post by:
I'm fairly new to the whole MySQL thing, But not new to SQL. So doing most of this was fairly easy, but I have a hosting service with Godaddy.com, and Yes it supports MySQL 5.0 and is installed and...
0
by: thesti | last post by:
hello, i'm trying to connect to SQL Server 2000 on my localhost through JDBC. i'm using the Microsoft SQL Server JDBC Driver 2.0 i couldnt make it, as i get the following error Unable to...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.