473,385 Members | 1,379 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,385 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 6842
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.