473,324 Members | 2,581 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,324 software developers and data experts.

Keep Getting the 'Cannot connect to database'

4
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 working. I'm trying to setup a basic news script for a upcoming website I have and I just wanted to dink around with it before I have everything up and going - But I seem to have a problem I keep coming across. Either my Screen will NOT show anything or will show Cannot connect to database. Now I have the database name correct, Everything should be correct.


<?php
$dbhost='host';
$dbusername='username';
$dbuserpass='pass';
$dbname = 'cossmoss';
?>

I left the db name. But I'm not 100% sure on how the dbhost is suppose to be setup, Since it is a remote connection. Any light to shed on this would be greatly appericate I've been stumped for the past 4 hours lol.

I've trying some of the following dbhost setups

ipipip.hostname
hostname.com:80 (80 being the port I think lol)
ipipipip
databasename:80
Jan 16 '08 #1
4 1883
stepterr
157 100+
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 working. I'm trying to setup a basic news script for a upcoming website I have and I just wanted to dink around with it before I have everything up and going - But I seem to have a problem I keep coming across. Either my Screen will NOT show anything or will show Cannot connect to database. Now I have the database name correct, Everything should be correct.


<?php
$dbhost='host';
$dbusername='username';
$dbuserpass='pass';
$dbname = 'cossmoss';
?>

I left the db name. But I'm not 100% sure on how the dbhost is suppose to be setup, Since it is a remote connection. Any light to shed on this would be greatly appericate I've been stumped for the past 4 hours lol.

I've trying some of the following dbhost setups

ipipip.hostname
hostname.com:80 (80 being the port I think lol)
ipipipip
databasename:80
I also use a hosting service, not GoDaddy though, so it may be different. But on mine I can just put the following.

[PHP]$dbhost = "localhost";[/PHP]

I'd give that a try if I were you. Good luck!
Jan 16 '08 #2
Gourk
4
Well appericate the helping hand, but alas it still does not work.


BUT I think I have found the problem, when setting up the php/mysql I didn't check install DSN LOL
Jan 16 '08 #3
Gourk
4
Hrm nvm, That is not even needed. I'm still having the same problem. It's like my hosting isn't even able to support php, I'm constantly seeing a White Screen. I even copied EXCALTY the information (username/databasename.. etc) from the godaddy information they gave me to the connect.php file =x
Jan 17 '08 #4
Gourk
4
FINALLY. Thanks for even posting m8, I finally got it to work.. I just had to read up on some documention on godaddy.com on their service, Come to find out it was on a linux server.. I was posting windows commands on it lol :P
Jan 17 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: James | last post by:
Please help - getting very desperate! Sun, 12 October 2003 05:39 I have PHPDEV 4.2.3 from Firepages.com.au as the upgrade to 4.3.0 did not work. I also had an abortive download from PHP.NET as...
6
by: Jeff Sandler | last post by:
I have a database I created in mySQL. I've been entering data every day into the database using a Java application that I wrote. The database and the Java program are on the same Win 98 SE...
2
by: Jay Chan | last post by:
We have just installed a SQL Server 2000 (SP 3A) onto a computer that has Windows-2003 Server on it. Now, we cannot get access to that database server from other computers. Seem like this may be an...
2
by: David Hearn | last post by:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred during the execution of the current...
0
by: CAIBird | last post by:
hi, i've been developing a webservice on machine A and one WebMethod of this webservice will connect to SQL Server2000 on machine B using a connect string defined in Web.config as below: <add...
4
by: Odd Bjørn Andersen | last post by:
I have installed DB2 9 Enterprise Edition on my laptop (Windows xp prof. ed.). But when I try to connect to any of my local databases I get this error: SQL30082N Security processing failed with...
6
by: antonyliu2002 | last post by:
I was able to view table content easily before, but after I reinstalled everything, I cannot find the option to view table content in MS SQL Server Express. I can define table with no problem. ...
10
by: priyakollu | last post by:
hi guyz! please help me in sorting out error as im unable to find it... my requirement is there will be userid field and password field and "login" button after clicking button certain validations...
0
by: =?Utf-8?B?UGFua2Fq?= | last post by:
Please go to http://www.a2zdotnet.com/Default.aspx for step by step tutorials for beginers in ADO.Net sections. -- regards, Pankaj http://www.A2ZDotNet.com "George" wrote:
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.