Solved

Connect Dreamweaver to MySQL hosted by GoDaddy

Posted on 2009-03-29
11
2,238 Views
Last Modified: 2012-05-06
Hi Experts, this one is over my head and Godaddy is no help at all. But hopefully someone has luck with this before. I have created a MySQL database on godaddy with direct remote connection enabled. I am using dreamweaver cs3 and trying to connedt to that database without luck. I continue to receive an error "HTTP error code 403 Forbidden"

I am new to the mysql stuff so not sure where the problem lies. I
In dreamweaver I have added the correct MySQL server, username, password, database name.

I have searched the web and many have complained about godaddy not helpfull in this matter, but I know it has been done, but I am to new and cannot understand where I am going wrong. Please can some guide me in getting this right?
0
Comment
Question by:nkengie81
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 3

Expert Comment

by:techmaza
Comment Utility
i have not used godaddy for website hosting but i have used other similar web hosting provider like brinkster.com and other i have not faced such problem but i think the problem is with ur syntax or server configuration to allow sql queries to fire....

i think u must provide code written in dreamweaver so that we can figureout the problem
 
0
 
LVL 10

Expert Comment

by:Kechka
Comment Utility
I think that you won't be able to connect.

selected from link below
HOSTING CAVEAT: The following hosting companies are not DreamWeaver friendly-

    * Godaddy.com hosting - don't even try it. They do not allow a MySQL connection with Dreamweaver

http://www.nebulex.com/index.php?option=com_content&view=article&id=6&Itemid=62

and from adobe newsgroups

I found that DW's PHP/MySQL behaviours are not available using GoDaddy
as a host.

http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=189&threadid=1344073&enterthread=y
0
 

Author Comment

by:nkengie81
Comment Utility
I have seen that information before, but I also found that it is possible with godaddy, but it was a pain and I don't have the expertize to meake it work.

Techmaza, where in dreamweaver would I find the coding so that I can post here? Remember, I am new to this stuff.
0
 

Author Comment

by:nkengie81
Comment Utility
This is the script that I am using in my DatabaseConnection.php file. I got this information from Godaddy. I am not sure what goes in the 'your_field' section. Do I need to list all the fields in my database here?
<?php

//Connect To Database

$hostname='jondoe.db.4149523.hostedresource.com';

$username='jondoe';

$password='password1';

$dbname='test';

$usertable='members';

$yourfield = 'your_field';
 

mysql_connect($hostname,$username, $password) OR DIE ('Unable to connect to database! Please try again later.');

mysql_select_db($dbname);
 

$query = 'SELECT * FROM $usertable';

$result = mysql_query($query);

if($result) {

    while($row = mysql_fetch_array($result)){

        $name = $row['$yourfield'];

        echo 'Name: '.$name;

    }

}

?> 

Open in new window

0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 250 total points
Comment Utility
What is your testing server set to?  It should exactly mimic the remote server settings...
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:nkengie81
Comment Utility
Jason: I am not at my computer right now, but I will take a look at that. That can possibly be my problem. At first I wasn't using a testing server (at least I don't think so). I then download MySQL last night for use as my testing server. You asked "what is my testing server set to" Is there something specific it needs to be. I probally don't understand it all, but learning as I go.

I have install MySQL Query Browser and was able to connect to MYSQL database without problems, so I know it has to be something I am doing wrong in dreamweaver.

Thanks
0
 
LVL 3

Expert Comment

by:techmaza
Comment Utility
It is correct PHP code to connect to database In PHP to connect with database and fetch the result

       First of all check whether connection is ok i.e, whether 'Unable to connect to database! Please try again later.' error is coming or not if this error is coming then u have to check username, password or hostname and if this message is not coming then check whether database "test" is present or not with table name 'members' and table field  'your_field'  thru phpMyadmin since database is in MySQL.




0
 
LVL 3

Assisted Solution

by:techmaza
techmaza earned 250 total points
Comment Utility
 The problem may be with Testing server what ur Using to test locally if u r testing locally with database residing in ur own server then u have to change connection parameters.

 I suggest to test ur website locally by installing WAMP or LAMP according to ur OS and then u have to just change connection parameters i.e hostname,username and password to connect with godaddy server.

0
 

Author Comment

by:nkengie81
Comment Utility
I can connect to the test server without problems. I can upload my webpages the remote server. But not the MySQL database. If the test server works ok, is there certain files that I need to transfer to godday for me to connect?
0
 
LVL 70

Expert Comment

by:Jason C. Levine
Comment Utility
Did you try what I suggested (set the testing and remote servers to be the same thing)?
0
 

Author Closing Comment

by:nkengie81
Comment Utility
Thank you guys, I guess I didn't quiet understand the testing server function. I installed the WAMPP, got that running correctly, then made certain that username, database name, server name and password was all the same. Thanks again for pointing me in the right direction. Working on login form, reset, and stuff like that, so sure to back with new questions soon. LOL For those that say that Godaddy won't work, I am living proof that it can.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now