Title: Problems using phpmyadmin to transfer WP databases
Last modified: August 19, 2016

---

# Problems using phpmyadmin to transfer WP databases

 *  [brian-score](https://wordpress.org/support/users/brian-score/)
 * (@brian-score)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/)
 * 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)

 *  [wordprest](https://wordpress.org/support/users/wordprest/)
 * (@wordprest)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262639)
 * try to remove the db header; usually that works
 *  Thread Starter [brian-score](https://wordpress.org/support/users/brian-score/)
 * (@brian-score)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262641)
 * Thank you for your reply. Sorry I am not that proficient with code, how do I 
   access that?
 *  [wordprest](https://wordpress.org/support/users/wordprest/)
 * (@wordprest)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262644)
 * 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](https://wordpress.org/support/users/brian-score/)
 * (@brian-score)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262651)
 * 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
 *  [wordprest](https://wordpress.org/support/users/wordprest/)
 * (@wordprest)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262654)
 * 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](https://wordpress.org/support/users/brian-score/)
 * (@brian-score)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262656)
 * 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
 *  [wordprest](https://wordpress.org/support/users/wordprest/)
 * (@wordprest)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262658)
 * **# 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](https://wordpress.org/support/users/brian-score/)
 * (@brian-score)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262663)
 * Hi, it looks like this:
 * — phpMyAdmin SQL Dump
    — version 2.11.9.5 — [http://www.phpmyadmin.net](http://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)
 *  [wordprest](https://wordpress.org/support/users/wordprest/)
 * (@wordprest)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262665)
 * Try to remove this:
 * **— phpMyAdmin SQL Dump
    — version 2.11.9.5 — [http://www.phpmyadmin.net](http://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 — [http://www.phpmyadmin.net](http://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](https://wordpress.org/support/users/brian-score/)
 * (@brian-score)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262676)
 * Hi tried both options, the message was
 * MySQL said:
 * #1046 – No database selected
 * I was uploading an …..sql.zip file.
 *  [wordprest](https://wordpress.org/support/users/wordprest/)
 * (@wordprest)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262680)
 * how db weights?
    did you create a new, empty db in destination host?
 *  Thread Starter [brian-score](https://wordpress.org/support/users/brian-score/)
 * (@brian-score)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262685)
 * 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?
 *  [wordprest](https://wordpress.org/support/users/wordprest/)
 * (@wordprest)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262687)
 * 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](https://wordpress.org/support/users/brian-score/)
 * (@brian-score)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262689)
 * 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.
 *  [wordprest](https://wordpress.org/support/users/wordprest/)
 * (@wordprest)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262693)
 * 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.

## Tags

 * [databases](https://wordpress.org/support/topic-tag/databases/)
 * [phpmyadmin](https://wordpress.org/support/topic-tag/phpmyadmin/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 15 replies
 * 2 participants
 * Last reply from: [wordprest](https://wordpress.org/support/users/wordprest/)
 * Last activity: [16 years, 6 months ago](https://wordpress.org/support/topic/problems-using-phpmyadmin-to-transfer-wp-databases/#post-1262693)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
