• I just read the page on using MAMP, and it seems simple enough. Rather than create a new DB, though, I’d like to copy the one from my remote server. Is this possible? I’m pretty new to mySQL stuff.

    Thanks…

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter mzimmers

    (@mzimmers)

    OK, I’ve made a backup of my online DB, downloaded it, and imported it into a new local DB. (The import appears to have been successful.)

    I followed the directions in the link above as best I could, but I didn’t get very far. When I go to my localhost:8888, I get an error:

    Error establishing a database connection

    What might I be doing wrong?

    Hi mzimmers,

    You’re probably going to have to change the username and password for the database in the wp-config.php file for your WordPress install.

    By default the username for your localhost should be “root” and the password will probably not be set.

    The lines of code in the wp-config should look like this:

    /** MySQL database username */
    define('DB_USER', 'root');
    
    /** MySQL database password */
    define('DB_PASSWORD', '');

    You might also need to change the WordPress address (URL)and the
    Site address (URL) in your WordPress admin under Settings>General Settings.

    Thread Starter mzimmers

    (@mzimmers)

    Thanks, ibullock. I did that, and the results are the same. If I understand your suggestions, I can’t do the latter until I can at least log in.

    I used phpMyAdmin to change the URL for the database, so I don’t know what else to try now.

    Do you have the WordPress install in the root of your localhost?

    I generally install mine in a subfolder so that they can be accessed with URLs like http://localhost/My-Website/ this helps avoid problems with any other files stored in the root.

    For example, MAMP/WAMP have some files in the root by default that help you browse the directory.

    Thread Starter mzimmers

    (@mzimmers)

    ib: I don’t know why, but for some reason, some of your posts aren’t displaying for me. I get the email notification, but that’s it.

    In answer to your question:

    Do you have the WordPress install in the root of your localhost?

    I changed the document root to my WP install. Maybe that was the wrong way to do it, but since MAMP gives you the option of changing your document root, I figured I’d try it. Do you think I should move it under htdocs instead?

    Hi mzimmers,

    I was flagged for “spam” last week, so that might explain my posts not displaying.

    Anyway, in your wp-config, did you check the name of the database there and the one you created on your localhost? If you named your database at all differently on your localhost vs. the remote server this would cause the error.

    An error establishing database connection practically has to be a misconfigured wp-config file, since it handles the connection to the database.

    Thread Starter mzimmers

    (@mzimmers)

    Aha! The problem was that there was indeed a password for the SQL account. (Verified by the MAMP start page.) Apparently, I now get into the database, because I no longer have an error message. But, my site is almost totally unformatted. Now I wonder if the php is getting properly processed.

    Still, it’s progress.

    Thread Starter mzimmers

    (@mzimmers)

    I’m continuing to make progress. I can now get to the admin area of my local installation. I’d like to change the Site Address setting, but I don’t seem able to leave it blank. (I thought you could do this in earlier versions.)

    What is the proper address format to use here? I’ve tried various things, and they either weren’t accepted by the page, or resulted in a 404 error.

    The pathname to the WP installation (I think) is:

    http://localhost:8888/Volumes/1_TB_HD/Users/mzimmers/ScopedIn/wordpress

    Thanks.

    Hi mzimmers,

    The path name should be the same as the path to your wp-admin but with the /wp-admin removed.

    That being said, I’ve had times when changing the path in the admin area has failed to work. In these cases you need to make changes directly in the database.

    Let me know if you’re still having trouble.

    Thread Starter mzimmers

    (@mzimmers)

    Ibullock: in response to your disappearing reply, I checked the DB, and it matches what’s in my settings page. The pathname I provide for the WordPress Address (URL) and the Site Address is:

    http://localhost:8888:Volumes/1_TB_HD/Users/mzimmers/ScopedIn/wordpress/

    I’ve tried it with, and without the final backslash.

    Now, 8888 is the port to Apache; that’s as it should be, right?

    Thread Starter mzimmers

    (@mzimmers)

    Well, it appears that I’ve taken a step backwards. My fooling around with the settings page have made the control panel inaccessible to me. What’s the quickest way to restore this? I have access to phpMyAdmin, and can directly enter the path in there…if I only knew what the right format of the path is.

    Edit:

    The error message I’m getting is:

    The requested URL /wordpress/index.php was not found on this server.

    and again, the url in my database is:

    http://localhost:8888/Volumes/1_TB_HD/Users/mzimmers/ScopedIn/wordpress/

    Thread Starter mzimmers

    (@mzimmers)

    OK, I appear to have my oars back in the water.

    The problem was that I duplicated pathnames. The entry in the DB should only point to the document root. Apparently, Apache takes care of the rest.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘moving DB from remote server to desktop’ is closed to new replies.