• Hi , hope you can help solve a problem

    I am trying to transfer my WP databases between hosts and am having all sorts of problems. I have tried suggested tick box options and exporting is fine.

    When I try to import I get all sorts of error messages, is there a trick to this, there is so much conflicting information I thought I would ask the experts.

    Both phpmyadmin versions are the same 2.11.95 on each host.

Viewing 15 replies - 1 through 15 (of 15 total)
  • try to remove the db header; usually that works

    Thread Starter brian-score

    (@brian-score)

    Thank you for your reply. Sorry I am not that proficient with code, how do I access that?

    the first, make a safe copy of your db.
    then, simply open it with any simple text editor such as Notepad (NOT Word or similar), and delete all the information at the top of the script.
    You should notice a line that divides the header from the real database content; well, just delete all that is above that line.
    Save and try to upload.

    Thread Starter brian-score

    (@brian-score)

    I tried that and got the following error message:

    MySQL said:

    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘Table structure for table wp_comments

    DROP TABLE IF EXISTS wp_comments‘ at line 1

    You have something like that:

    # WordPress MySQL database backup
    #
    # Created: Tuesday 13. October 2009 12:38 CEST
    # Hostname: sql.mydomain.net
    # Database: blahblah
    # ——————————————————–
    # ——————————————————–
    # Table: wp_comments
    # ——————————————————–

    #
    # delete table wp_comments
    #

    DROP TABLE IF EXISTS wp_comments;

    You probably deleted that last line…

    Thread Starter brian-score

    (@brian-score)

    What it starts with is this:

    Table structure for table wp_comments

    DROP TABLE IF EXISTS wp_comments

    I deleted everything before the header line stops

    # WordPress MySQL database backup
    #
    # Created: Tuesday 13. October 2009 12:38 CEST
    # Hostname: sql.mydomain.net
    # Database: blahblah
    # ——————————————————–
    # ——————————————————–
    # Table: wp_comments
    # ——————————————————–

    #
    # delete table wp_comments
    #

    Thread Starter brian-score

    (@brian-score)

    Hi, it looks like this:

    — phpMyAdmin SQL Dump
    — version 2.11.9.5
    https://www.phpmyadmin.net

    — Host: localhost
    — Generation Time: Oct 31, 2009 at 01:12 PM
    — Server version: 5.0.81
    — PHP Version: 5.2.9

    SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”;

    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;


    — Database: tenerif6_wrd01

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


    — Table structure for table wp_comments

    DROP TABLE IF EXISTS wp_comments;
    CREATE TABLE wp_comments (
    comment_ID bigint(20) unsigned NOT NULL auto_increment,
    comment_post_ID bigint(20) unsigned NOT NULL default ‘0’,
    comment_author tinytext NOT NULL,
    comment_author_email varchar(100) NOT NULL default ”,
    comment_author_url varchar(200) NOT NULL default ”,
    comment_author_IP varchar(100) NOT NULL default ”,
    comment_date datetime NOT NULL default ‘0000-00-00 00:00:00’,
    comment_date_gmt datetime NOT NULL default ‘0000-00-00 00:00:00’,
    comment_content text NOT NULL,
    comment_karma int(11) NOT NULL default ‘0’,
    comment_approved varchar(20) NOT NULL default ‘1’,
    comment_agent varchar(255) NOT NULL default ”,
    comment_type varchar(20) NOT NULL default ”,
    comment_parent bigint(20)

    Try to remove this:

    — phpMyAdmin SQL Dump
    — version 2.11.9.5
    https://www.phpmyadmin.net

    — Host: localhost
    — Generation Time: Oct 31, 2009 at 01:12 PM
    — Server version: 5.0.81
    — PHP Version: 5.2.9

    SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”;

    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;


    — Database: tenerif6_wrd01

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


    — Table structure for table wp_comments

    If doesn’t work, try this:

    — phpMyAdmin SQL Dump
    — version 2.11.9.5
    https://www.phpmyadmin.net

    — Host: localhost
    — Generation Time: Oct 31, 2009 at 01:12 PM
    — Server version: 5.0.81
    — PHP Version: 5.2.9

    SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”;

    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;


    — Database: tenerif6_wrd01

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


    — Table structure for table wp_comments

    Thread Starter brian-score

    (@brian-score)

    Hi tried both options, the message was

    MySQL said:

    #1046 – No database selected

    I was uploading an …..sql.zip file.

    how db weights?
    did you create a new, empty db in destination host?

    Thread Starter brian-score

    (@brian-score)

    The dbs are quite light, only about 100 posts.

    No I did not do it that way, I exported and then renamed before importing using phpmyadmin.

    Can I import text, csv, or other files, will it still work?

    Yes. But you have to import your database in a new one.

    1- create a new database on destination host.
    2- import the saved one in it.

    Thread Starter brian-score

    (@brian-score)

    Thank you so much, sometimes you cannot see the wood from the trees.

    In fact I did not alter the sql files, they dropped straight away without mods. Sorry to miss a fundamantal and waste your time.

    It doesn’t matter. I’m alone at home just annoying…;-)

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Problems using phpmyadmin to transfer WP databases’ is closed to new replies.