• Hello WP pros,

    I’ve used WordPress for many years, but haven’t done much extensive under the hood. I’m not experienced in SQL or dev environments, so go easy on me please.

    I’ve run into an issue taking a site currently live on a Media Temple account, and creating a duplicate site I want to run locally for dev purposes. I installed MAMP on my OSX machine, and successfully set up a clean install of WP 4.0, which works fine. I want to export the DB from the live site, so I can import it to the local site.

    Here’s my problem: the live site was created using Media Temple’s one-click WP install service. Somehow this made two databases – one called ‘db127350_wp’ and one called ‘db127350_main’. The WP config file is linked to ‘db127350_wp’. I would expect to see only one DB ordinarily – not sure how I ended up with two!

    If I export either one from PhpMyAdmin, the process seems to run fine, and the file downloads ok. BUT – if I import either DB from the PhpMyAdmin running locally within MAMP, I get fatal errors.

    Where should I start troubleshooting? Is this a typical issue with one-click WP installs?

    thanks very much,
    James

Viewing 4 replies - 1 through 4 (of 4 total)
  • I get fatal errors…

    What exactly are the errors?

    The WP config file is linked to ‘db127350_wp’

    That’s the one you need.

    Thread Starter James White

    (@jamesfacts)

    Thanks very much for clearing up the DB I need to use.

    When I try to import the file generated by exporting ‘db127350_wp ‘ from Media Temple, I get this error:

    -- Database:db127350_wp`

    — ——————————————————–


    — Table structure for table wp_clean_commentmeta

    CREATE TABLE IF NOT EXISTS wp_clean_commentmeta (
    meta_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    comment_id bigint(20) unsigned NOT NULL DEFAULT ‘0’,
    meta_key varchar(255) DEFAULT NULL,
    meta_value longtext,
    PRIMARY KEY (meta_id),
    KEY comment_id (comment_id),
    KEY meta_key (meta_key)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;`

    MySQL said: Documentation

    #1046 – No database selected

    What is the name of the database in MAMP? Are you sure you have created a database?

    If you have created a database, select it in the left hand column of phpmyadmim and import.

    Thread Starter James White

    (@jamesfacts)

    Hmm, maybe I am simply using PhpMyAdmin incorrectly.

    If I create a db with the correct name, and try to import to it, I get this error message:

    #1062 - Duplicate entry '1' for key 'PRIMARY'

    What I had been doing initially was importing the .sql file first, which seems to cause PhpMyAdmin to make a new db with the correct name (despite the errors I get) Here’s a screenshot of what turns up in the left-hand column after importing the .sql file without first creating a new db of the same name:

    https://jfwhite.org/wp-content/uploads/2014/10/Screen-Shot-2014-10-19-at-3.23.41-PM.png

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Issues exporting database made by Media Temple one-click install’ is closed to new replies.