Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Connecting to database

Guest
Jul 01, 2007 Jul 01, 2007
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?[
TOPICS
Server side applications
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 01, 2007 Jul 01, 2007
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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 01, 2007 Jul 01, 2007
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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007
wrecks wrote:
> 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"?

It means that the password was not passed on for some reason. Looking
back at your original post, I think that the following line probably
explains the problem:

"The testing server specified for this site does not map to the
http://ftp.3ducats.com/www/cafe/_mmServerScripts/MMHTTPDB.php"

In your site definition, the URL prefix for Testing server should point
to the root folder of your remote site ( http://www.3ducats.com/). It
looks as though you have let Dreamweaver fill in the URL prefix
automatically - Dreamweaver's guess is always wrong. (See pages 93-94 of
"Foundation PHP for DW8".)

> 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 glad you found it useful.

> 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?

"The Essential Guide to Dreamweaver CS3" is a much expanded update of
"Foundation PHP for Dreamweaver 8". Although there is new material
covering the PHP server behaviors, it won't teach you a great deal more
about PHP than the book you already have. However, it does have the
advantage that it incorporates all the changes made in the Dreamweaver
8.0.2 updater.

"PHP Solutions" is dedicated to hand-coding. Although the book was
written using Dreamweaver, it doesn't make use of any Dreamweaver server
behaviors. It will take your PHP knowledge further by showing you how to
do things like upload files, manipulate the file system, create
thumbnails, and hand-code database connections.

Which book is better for you really depends on your priorities. Although
"The Essential Guide to Dreamweaver CS3" doesn't contain a lot more PHP
than the book you already have, I have tried to improve the explanations
based on feedback from readers, so you may find the new perspective
helps clarify things in your mind. Also, roughly half the book is
completely new, covering new features in CS3, such as Bridge, the
improved CSS Styles panel, and Spry.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007
Are you trying to connect to your remote server database from your PC?
You remote may not allow this. In your remote database admin there will be
an area for allowed IP's
If you have a fixed IP you can put that in.
If not sometimes a wildcard is accepted:
%
Not too sure that % is secure

--

"wrecks" <webforumsuser@macromedia.com> wrote in message
news:f69jl3$lsv$1@forums.macromedia.com...
: 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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007
joe wrote:
> Are you trying to connect to your remote server database from your PC?
> You remote may not allow this.

Although most hosting companies block remote access to a database,
Dreamweaver uploads a hidden folder called _mmServerScripts to the site
root if you designate the remote server as the testing server. This acts
as a proxy for a local connection. If correctly set up, it works fine,
even if the server doesn't accept remote connections to the database.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007


--

"David Powers" wrote
:
: Although most hosting companies block remote access to a database,
: Dreamweaver uploads a hidden folder called _mmServerScripts to the site
: root if you designate the remote server as the testing server. This acts
: as a proxy for a local connection. If correctly set up, it works fine,
: even if the server doesn't accept remote connections to the database.

Thanks David.
I tend to have my testing server set up locally but use the remote database.
Often wondered what the _mmServerScripts were for when I have seen them.
Useful info

:
: --
: David Powers, Adobe Community Expert
: Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
: Author, "PHP Solutions" (friends of ED)
: http://foundationphp.com/


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007
joe wrote:
> Often wondered what the _mmServerScripts were for when I have seen them.

On a remote server, they act as a proxy. Dreamweaver also uses them to
communicate with the database in a local testing environment. The
scripts not only perform the database connection, they're responsible
for populating all the server behavior dialog boxes and the Bindings
panel with the details of your database tables and columns.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007
When you say:
" This acts as a proxy for a local connection. If correctly set up"
Are they correctly set up by default or must adjustments be made?
thanks
joe

--

"David Powers" <david@example.com> wrote in message
news:f6ajsc$suu$1@forums.macromedia.com...
: joe wrote:
: > Often wondered what the _mmServerScripts were for when I have seen
them.
:
: On a remote server, they act as a proxy. Dreamweaver also uses them to
: communicate with the database in a local testing environment. The
: scripts not only perform the database connection, they're responsible
: for populating all the server behavior dialog boxes and the Bindings
: panel with the details of your database tables and columns.
:
: --
: David Powers, Adobe Community Expert
: Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
: Author, "PHP Solutions" (friends of ED)
: http://foundationphp.com/


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007
On 02 Jul 2007 in macromedia.dreamweaver.appdev, joe wrote:

> " This acts as a proxy for a local connection. If correctly set up"
> Are they correctly set up by default or must adjustments be made?

What version of DW are you using? The scripts which come with MX use
$HTTP_POST_VARS in MMHTTPDB.php; this causes many servers to error out.
Later versions use the correct $_POST.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/contact.php
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007
DW8

--
joe

"Joe Makowiec" <makowiec@invalid.invalid> wrote in message
news:Xns996144AB41FBEmakowiecatnycapdotrE@216.104.212.96...
: On 02 Jul 2007 in macromedia.dreamweaver.appdev, joe wrote:
:
: > " This acts as a proxy for a local connection. If correctly set up"
: > Are they correctly set up by default or must adjustments be made?
:
: What version of DW are you using? The scripts which come with MX use
: $HTTP_POST_VARS in MMHTTPDB.php; this causes many servers to error out.
: Later versions use the correct $_POST.
:
: --
: Joe Makowiec
: http://makowiec.net/
: Email: http://makowiec.net/contact.php


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007
mmm, access denied 1045 error
guess it cannot be the default setting.

--
joe
"joe" <joe@nospam.com> wrote in message
news:f6alts$1vl$1@forums.macromedia.com...
: DW8
:
: --
: joe
:
: "Joe Makowiec" <makowiec@invalid.invalid> wrote in message
: news:Xns996144AB41FBEmakowiecatnycapdotrE@216.104.212.96...
: : On 02 Jul 2007 in macromedia.dreamweaver.appdev, joe wrote:
: :
: : > " This acts as a proxy for a local connection. If correctly set up"
: : > Are they correctly set up by default or must adjustments be made?
: :
: : What version of DW are you using? The scripts which come with MX use
: : $HTTP_POST_VARS in MMHTTPDB.php; this causes many servers to error out.
: : Later versions use the correct $_POST.
: :
: : --
: : Joe Makowiec
: : http://makowiec.net/
: : Email: http://makowiec.net/contact.php
:
:


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007
joe wrote:
> When you say:
> " This acts as a proxy for a local connection. If correctly set up"
> Are they correctly set up by default or must adjustments be made?

You don't need to do anything to the files themselves, but a large
number of people go astray when setting up their Testing server in the
Dreamweaver site definition. There are two fields that need filling in:
Testing server folder and URL prefix (if connecting to a remote server,
Testing server folder is called Host directory).

The first requires the path to the server root folder; the second
requires the URL to the same location. It's amazing how many people get
this wrong, but if you do, Dreamweaver can't communicate with the database.


--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 02, 2007 Jul 02, 2007
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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007
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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007
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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 02, 2007 Jul 02, 2007
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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007
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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 02, 2007 Jul 02, 2007
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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2007 Jul 02, 2007
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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 02, 2007 Jul 02, 2007
LATEST
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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines