Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Page 1 of 2 12 LastLast
Results 1 to 15 of 17

This is a discussion on newbie ? - connecting to db using dreamweaver in the Shared & Semi-Dedicated forum
I'm trying to connect to a mySQL db using DreamWeaver, but it won't connect using localhost. PHP files work fine. I'm a complete newbie to ...

  1. #1
    JPC Member
    Join Date
    May 2002
    Posts
    21

    newbie ? - connecting to db using dreamweaver

    I'm trying to connect to a mySQL db using DreamWeaver, but it won't connect using localhost. PHP files work fine. I'm a complete newbie to db's, mySQL and PHP and teaching myself.

    The message I get when trying to connect is that access denied for 'username@localhost'. (I've replaced "username" with my own.)

    Thanks! Sorry for the dumb question. This may be just the beginning...

    tlc

  2. #2
    Ron
    Guest
    Is your database name in your connect variables prefaced with "username_"?
    (as you say, make sure to replace "username" with your username )

    In udder words, if your db name is foobar and your username is thelocal the connect variables for your database name should be set up to be

    thelocal_foobar

  3. #3
    JPC Member
    Join Date
    May 2002
    Posts
    21
    were it that simple...I did that part.

  4. #4
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Is this an error you are getting from inside Dreamweaver or is it something that's comming up in a script that you created with Dreamweaver and uploaded to your server that you are trying to access through a browser? If it is the former, you won't be able to access your server's MySQL server with "localhost." Localhost literally means "this machine," so when you tell something to connect to localhost you are telling it to connect to a service running on the same machine as the program that's trying to access it--so unless you've installed MySQL on the same machine as Dreaweaver, its not going to work.

    What you can do is this:
    1. Find your current IP address. On windows you can get this by either going to Start>Run and entering "winipcfg" or by going to Start>Run and entering "cmd" and then "ipconfig" at the command prompt. If you are behind a router you'll need to find the IP of the "outside" connection to the router (how you get this will vary by router model).

    2. Log in to your control panel and click on MySQL Databases. Scroll down to the bottom of the page to the "Add Acces Host" section and enter the IP you found in step 1.

    3. In Dreamweaver, use either your domain name or your server's IP address as the host for MySQL to connect to.

    Note that with most ISP's your IP address can change every time you connect to the 'Net, so you may have to change the address in the access hosts section every time you try to connect.

    Hope this helps.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  5. #5
    JPC Member
    Join Date
    May 2002
    Posts
    21
    OK. Different message this time. There's a timeout. Says to make sure either the web server is up and running (I've selected the db through phpAdmin on jag) or that the ODBC DSN exists on the testing server.

    I've been trying to do all this remotely, but it seems like it'll just be better to install mySQL on my computer. Do I need to also install php? I've been trying to avoid installing Apache AND php AND mySQL since my computer's 3 years old and I'm running out of space.

    Thanks for your help and suggestions!

    Theresa

  6. #6
    JPC Senior Member
    Join Date
    Jun 2004
    Location
    Hakuba Nagano Japan
    Posts
    52
    Sorry for my strange question (maybe?)

    **************************************** ************
    In udder words, if your db name is foobar and your username is thelocal the connect variables for your database name should be set up to be
    **************************************** ************

    What does the UDDER exactly mean? My dictionary doesn't have it
    Cozy home in country.
    http://www.hakubajapan.com

  7. #7
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Its a typo. I think the poster meant "other." "In other words" is a very common phrase in English meaning that you are going to explain something again a different way to ensure that you (or the person/people you are talking to) really understand.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  8. #8
    Ron
    Guest
    Thank you Jason for the explanation.

    It wasn't exactly a typo, however, it was a pun, as "udder" and "other" sound alike.

    Puns and idiomatic expressions must be very difficult to translate.

  9. #9
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Originally posted by Ron
    It wasn't exactly a typo, however, it was a pun, as "udder" and "other" sound alike.
    I realized that when I posted, although it was easier to call it a typo.

    Gamerajp,

    If you are interested, an udder is the part of the cow that we get milk from. The word is also sometimes used in place of "utter" as a pun (or a real typo sometimes), which means "extreme" or "a very large amount of," such as in "utter chaos."

    Buy hosting, get free English classes.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  10. #10
    JPC Addict
    Join Date
    May 2002
    Location
    Northwest Florida
    Posts
    202
    thelocal,

    I'd go ahead and install both MySQL and PHP on your local machine. I've done this and it works great for most development and debugging. You've got to watch your usernames, passwords, dbnames, etc. and make sure you change every reference to them when you're going from your local machine to JPC's. You might, though, set your local machine up to use the same name formats as JPC's. It'd sure make the going back and forth easier!
    Jim Winters
    Technology Lighthouse, Inc.
    Lighting the way for small business and nonprofit organizations.

  11. #11
    Ron
    Guest
    ---or maybe use an include file that held these definitions...

  12. #12
    JPC Senior Member
    Join Date
    Jun 2004
    Location
    Hakuba Nagano Japan
    Posts
    52
    ahh i see. Udder = other? lol...
    I wonder it would be uNder which confused me.
    This is a problem for not an English speaker.
    Cozy home in country.
    http://www.hakubajapan.com

  13. #13
    Jag Veteran
    Join Date
    Sep 2002
    Posts
    650
    [curiously] are we getting any Japanese classes in return?

  14. #14
    JPC Senior Member
    Join Date
    Jun 2004
    Location
    Hakuba Nagano Japan
    Posts
    52
    Haha. tell me what you want to learn

    But you have to be sure we use 3 kinds of letters together in a line when we write! - if i dare explain, it's like you use English alphabet, Greek alphabet and Crylic alphabet together in a line!
    Much more complicated than English, you just learn 26 letters when you write English but at least we need to learn about 50 hiragana letters, 50 katakana letters and damn f*cking a lot kanji which is originally from china. Probably more than 10,000 kanji letters that is too hard to remember all.
    They say that usually we know 1,000 - 2,000 kanji letters to survive, i have never counted how many i know !!! lol..

    Are you sure you would take the class??? lol...
    Cozy home in country.
    http://www.hakubajapan.com

  15. #15
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    And they say that English is one of the hardest languages to learn....

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •