Skip to main content
Jul 1, 2007 8:25 PM UTC
Question

Connecting to database

I have a database that I created directly on my remote server.
I set up a php site in DW.
I didn't want to set up a testing server, so I chose "none"

Clicked the plus button under databases, filled in the dialog box, but it wouldn't connect.
I got the following error message:
"“An unidentified error has occurred.”

In an attemp to remedy this, I tried (to no avail):

1) Setting up on my remote server, I got the error message:

"MySQL Error#: 1130 Host ('cpe-76-...etc')is not allowed to connect to this server."

2) Setting up on my local server, I got the error message:

"HTTP Error Code 404 File was not found. Here are some possible reasons for the problem:
1) There is no testing server running on the server machine. (I don't have the database on my local machine)
2) The testing server specified for this site does not map to the http://ftp.3ducats.com/www/cafe/_mmServerScripts/MMHTTPDB.php"

I believe I have the MySQL Connection boxes filled in properly:

Connection Name: conn (followed by whatever you want to call the connection)
MySQL Server: The URL to the site (in this case, www.3ducats.com)
User name: The user name I set up in users when I created the database
Password: The password I created I setup for the admin user when I created the database

I've scoured this forum (and others), looked up the error codes with Google, and contacted my host provider.
Most of the answers were for different situations. The ones that applied to me were either unanswered or I simply didn't understand the solution.

Can anyone explain in non technical language (loud and slow) what I'm missing or doing wrong?

Or at least point me to a book (preferably one written in the David Powers style) that will give this designer a fighting chance?

Thanks for listening,

Sophia

Footnote:

I followed Power's advice in another post and changed back to the remote testing machine, making sure the addresses matched for local and remote - now I'm getting this error message:
“MySQL Error#: 1130 Host ‘dedicated.( hosting company address)’ is not allowed to connect to this MySQL server.”

I sent off another email to my hosting company. Is this something they should be handling?[
This topic is closed to new replies. Start a new post to keep the conversation going.

20 replies

Jul 2, 2007 1:14 PM UTC
If it's half as good as PHP for Dreamweaver 8, I have no doubts. I got on the waiting list at Barnes and Noble.
Translate
Inspiring
Jul 2, 2007 12:48 PM UTC
wrecks wrote:
> Thank you David. I'm connected.

Great!

> On the other topic, I decided to start with The Essential Guide to CS3 to
> reinforce what I've learned from PHP for Dreamweaver 8. Then I'll move to PHP
> solutions.

"The Essential Guide to DW CS3" was shipped to the printers at the end
of last week, so it should be ready in time for the advertised
publication date (23 July). Hope it lives up to your expectations.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Jul 2, 2007 12:21 PM UTC
Thank you David. I'm connected.
I realize now that since this site is being developed in a folder on my site, my "root site" should include the folder name. I changed that and it worked.

I can't wait until I can "pass it forward" when I finally have the requisite knowledge to help someone else on this forum.

On the other topic, I decided to start with The Essential Guide to CS3 to reinforce what I've learned from PHP for Dreamweaver 8. Then I'll move to PHP solutions.

Thanks for all your help.

Sophia
Translate
Inspiring
Jul 2, 2007 11:57 AM UTC
wrecks wrote:
> David, should I ask my hosting provider to to set up a remote access to the
> database? Or is there a better way to do this?

Have you tried the settings I have just given you? They should work
without getting the host to set up remote access.

You can ask for remote access if you want, but if you're having
difficulty with the basic setup, I'm not convinced it will solve your
problem.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Jul 2, 2007 11:49 AM UTC
It's probably because if they're not written exactly the same. Dreamweaver produces a warning saying that they don't match and it could cause problems. It's hard to ignore this warning if you don't have the confidence of an experienced developer.

David, should I ask my hosting provider to to set up a remote access to the database? Or is there a better way to do this?
Translate
Inspiring
Jul 2, 2007 11:45 AM UTC
Thanks for that David.
my mistake had been to put the remote url in the connections rather that
localhost

--
joe
"David Powers" <david@example.com> wrote in message
news:f6ao8g$4it$1@forums.macromedia.com...
: wrecks wrote:
: > Should I ask the hosting company to set up a remote access to the
database?
:
: What your hosting company tells you is correct. In normal circumstances,
: you cannot connect to a remote database from your local computer.
: However, what I have been trying to explain is that Dreamweaver uploads
: a folder called _mmServerScripts, which gets round this restriction.
:
: In your site definition, select the Advanced tab, and then select
: Testing server. Use the following settings:
:
: Server model: PHP MySQL
: Access: FTP
: FTP host: ftp.3ducats.com
: Host directory: /www/cafe/
: Login: your_website_username
: Password: your_website password
: URL prefix: http://www.3ducats.com/cafe/
:
: When you create a MySQL connection in Dreamweaver use the following
: settings:
:
: Connection name: whatever_you_like
: MySQL server: localhost
: Username: ducatsop_phia
: Password: your_MySQL_password
: Database: ducatsop_bangkok
:
: You should then be able to connect to your remote database from
Dreamweaver.
:
: --
: David Powers, Adobe Community Expert
: Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
: Author, "PHP Solutions" (friends of ED)
: http://foundationphp.com/


Translate
Inspiring
Jul 2, 2007 11:41 AM UTC
wrecks wrote:
> Should I ask the hosting company to set up a remote access to the database?

What your hosting company tells you is correct. In normal circumstances,
you cannot connect to a remote database from your local computer.
However, what I have been trying to explain is that Dreamweaver uploads
a folder called _mmServerScripts, which gets round this restriction.

In your site definition, select the Advanced tab, and then select
Testing server. Use the following settings:

Server model: PHP MySQL
Access: FTP
FTP host: ftp.3ducats.com
Host directory: /www/cafe/
Login: your_website_username
Password: your_website password
URL prefix: http://www.3ducats.com/cafe/

When you create a MySQL connection in Dreamweaver use the following
settings:

Connection name: whatever_you_like
MySQL server: localhost
Username: ducatsop_phia
Password: your_MySQL_password
Database: ducatsop_bangkok

You should then be able to connect to your remote database from Dreamweaver.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Jul 2, 2007 10:38 AM UTC
First, thank you both for such great help! I woke up this morning to find replies from both the forum and my hosting co. And I think I understand (even before my first cup of coffee). :-)
My host said:
"Sophia, the connection strings for the database on the server is listed on the very first page when you click on MySQL Databases from the CPanel. There is one for Perl, and one for PHP. If you are using PHP to call and access the database, then you would use this one:

$dbh=mysql_connect ("localhost", "ducatsop_phia", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("ducatsop_bangkok");

However, you cannot do this from your computer. The request has to come from software on the server, i.e. a web page or script on the server that makes the request. If you want to test if from your computer, we have to set up remote access to the database for you which is not set up by default."

So, I changed the remote address in my site definition (ignoring the warning that says the remote and local doesn't match). Now it tells me that there is no testing server running on the server machine - which makes sense now.

Should I ask the hosting company to set up a remote access to the database?

Thank you again for coming to my rescue. I have until mid-week to see if I can handle this job properly before accepting it.
Translate
Inspiring
Jul 1, 2007 10:31 PM UTC
wrecks wrote:
> I believe I have the MySQL Connection boxes filled in properly:
>
> Connection Name: conn (followed by whatever you want to call the connection)

Correct.

> MySQL Server: The URL to the site (in this case, www.3ducats.com)

Wrong. It needs to be the server address. This is frequently "localhost"
(without the quotes), or whatever your hosting company has given you as
the MySQL server address.

> Or at least point me to a book (preferably one written in the David Powers
> style) that will give this designer a fighting chance?

Links to my books are in my sig.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Jul 2, 2007 1:16 AM UTC
I tried localhost with the username and password I assigned when I created the database. I got error message 1045 "Access denied for ducatsop_phia@localhost (using password:NO)" The weird thing is I used a password - why would it say "password:NO"? in any case, I sent an email to my hosting company asking if localhost was good or if there's a specific address for the MySQL server.

On the same note, I have (and consumed) PHP for Dreamweaver 8. Out of a half dozen books, that was the only one that I didn't have to struggle with. The others just collect dust on my shelf.

I'm now using CS3 and trying to create a dynamic website for a restaurant where the viewers can choose from the menu and print out a completed order for faxing.

I can't attend classes because of my health, so I'm limited to online tutorials and books. Design seems to have come easily to me, but I'm losing my hair over this backend stuff!

Knowing my dynamic experience is limited to Chapters 1 - 10 of Php for Dreamweaver 8, and a basic knowledge of constructing a database, which would you recommend first; The Essential Guide to Dreamweaver CS3 or PHP Solutions: Dynamic Web Design Made Easy?

Translate