Skip to main content
January 15, 2011
Question

dw cs5 with existing wordpress site hosted on yahoo need help connecting to existing remote database

  • January 15, 2011
  • 2 replies
  • 1796 views

I am having trouble establishing a database connection.  I can  connect with test databases but am having trouble using dreamweaver wtih  my existing wordpress website.  Am I able to use dreamweaver to edit  and live view my changes before uploading the changed files to my live  site?  Am I able to access my existing wordpress database with  dreaweaver?  I have imported it to my testing server/database but still  seem to be having trouble establishing a connection with it (think maybe  my folder hierarchy might be off).

macintosh HD/Applications/MAMP/htdocs/nwm/wp/index.php

"nwm" is the name of the folder that I have copied all of my site  files to and the folder I have dreamweaver pointing to.  "wp" is what I  have all of the wordpress files in (the ones I copied from my yahoo  server - including all my current theme files etc.)

I am trying to put the info into the mysql connection dialog box:

Connection Name: Testing (i am assuming this name is for my benefit only and doesn't actually matter)
MySQL Server: mysql
User Name: *****
Password: *****
Database: wp

and am getting this message

MySQL Error#: 2013

Lost connection to MySQL server at 'reading initial communication packet', system error 61

did some google seaches of the error.  Tried turning off the  firewall, and the advance tab allow mysql incoming  (there were 2 one  was allow one was not allow.  I changed both to allow)

Cant really find anything on yahoo to help me out.  Looked in  phpmyadmin database named wp: wp_users to get the username and password  (which due to previous look for help - I think the password was  encrypted cuz it looked like a bunch of mumbo jumbo and am fairly  certain I know the correct password).

Any help would be greatly appreciated!! I spent $50 on live chat  last night trying to resolve the issue only to find out at the end that  the guy really didn't understand my problem and doesn't have  dreamweaver.  I have also watched countless videos on Lynda.com and have  been thru forum after forum.  While this problem is only a couple weeks  old since I just got CS5.  I have been having trouble making any  headway learning php since I cant seem to make it past the set up  parts.  I have done the php / mysql essential training on lynda.com with  relative success except that I really dont want to work with any more  exercise files so I didn't go on to the beyond the basics. I recently  went thru most of the Dreamweaver CS5 and Wordpress 3. Also did the  first 4 chapters of Dreamweaver CS5 with PHP and MySQL. I need to start  integrating things into my live sites.  I am also trying to work my way  thru the learning php, mysql, javascript book by o'reily media by robin  nixon (as fun as reading a math text book) can't get thru it since I  can't relate any of it to my current sites/needs

I am on MacBookPro OSX 10.6.6
Installed MAMP to specification on all 20 tutorials I have tried including lynda.com
Tested the testing server and is working
Just installed dreamweaver cs5
have been using wordpress online to create and edit posts (recently  upgraded to 3.? whatever the latest update was online which I believe  update the files on my yahoo server?)
Have also installed wordpress on my computer (several times thru each tutorial trying to get this right.)

Am I expecting the impossible?

This topic has been closed for replies.

2 replies

January 15, 2011

Well I just re exported my db from phpmyadmin inside wordpress and re imported to db i just created with same name into the phpmyadmin on my computer.  I can browse it and and edit is in phpmyadmin.

Dreameaver will still not discover any dynamic related pages due to internal server error

And the live view of wp-login.php give me a view of the page that looks like the live wordpress.org with an

"Error establishing a database connections

This either means that the username and password infomation in your wp-config.php file is incorrect or we can't contact the database server at mysql.  this could mean your hosts database server is down.

  • are you sure you have the correct username and password?
  • are you sure that you have typed the correct hostname?
  • are you sure that the database server is running?

if you're unsure what these terms mean you should probably contact your host.  if you still need help visit the wordpress support forums."

I am not sure that the username and password is correct but have tried both root and the username and password that I use to login to wordpress online.

No i am not sure that I have typed the correct hostname but I have tried both localhost and mysql.

No I am not sure the database server is running but it has a green light on my local server and I can browse and edit the db on both my local machine and online.

David_Powers
Inspiring
January 15, 2011

jennlmont wrote:

Am I expecting the impossible?

Hard to say, because it's not very clear what you're expecting. It's obvious that you have gone through a lot of tutorials, but still don't have a clear idea of how everything fits together.

First of all, WordPress controls its own connection to the database. There is no need to set up a MySQL connection in Dreamweaver. WordPress uses the settings in wp-config.php.

The simple way to work with WordPress in Dreamweaver CS5 is to install WordPress on your local computer using the same database name and login details as on your remote site.

  1. If you have an existing WordPress site on the internet, define a site for it in Dreamweaver.
  2. Download all the files from your remote server to the new Dreamweaver site.
  3. Create an empty database on your local computer, and give it the same name as the database on your remote server.
  4. Also create a local MySQL user account using the same database username and password as on your remote site.
  5. Run the WordPress installation script by accessing wp-admin/install.php in a web browser.

You now have an exact copy of your remote WordPress site on your local computer. The only difference is that the database doesn't contain any of the entries on your remote server. You can easily export the contents of the remote database and import it into the local one using phpMyAdmin or Navicat. Alternatively, just create some dummy material in your local database.

By the way, you'll find it easier to get help if you keep your questions focused to one issue at a time. Also, please don't post the same questions in several places. I have deleted your identical comments in the Adobe Developer Connection.

January 15, 2011

If wordpress controls it's own connection why am I unable to use the live view. I have synced the remote site to my local computer so all the files should be just as they are online with the exception of the DB which contains most of the content.

I have done all of those steps.  I have even exported the database from inside internet phpmyadmin and imported into computer phpmyadmin.  When I hit live view I get one of couple of errors.

1.  "One is that the dynamic related files could not be displayed due to an internal server error"

At some point I was able to view some sample files inside dreamweaver.  But I would like to be able to view my real site files.  I was able to "connect" to the local databases (not the copy of my real one - I think that maybe that was because it is somehow nested inside another db an am going try to reimport to new location).  And then I changed the host/username/password trying to deal with the internal server error. Now instead I get the cannot connect to the database Error 2016 or whatever from the origianl post. Also, I am using yahoo if that matters and all I can find about what their server name is: mysql - is that correct?

I have been thru this so many times with so many different tutorials I am losing track of what is what.

2.  Can I access my remote database within dreamweaver? I do not want to create dummy files (seems to be a waste of time).  And while if it had worked exporting/importing a duplicate on to my computer would have satisfied me for a little while it also seems some what counter productive.  Since every post and page is different if I were doing a daily updates etc how would I be able to change the formating or design of them if I can't access the remote files.  Would I re- import everytime I want to work on it to get current database?

I am trying to be clear.  I listed all the specs I could think as listed  in your "how to get help fast post" (yes I read that at least twice  too) of all of the steps and possible reasons for my problems.  I also  thought that the forum was on a seperate site so I didn't think it would  count as a duplicate.  I am frustrated to tears and am feeling  incredibly stupid that after all this time and all these tutorials yes  you are right I obviously am not understanding what is going on which is  why I am on this forum.