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.
-
try to remove the db header; usually that works
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.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_commentsDROP TABLE IF EXISTS
wp_comments‘ at line 1You 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 tablewp_comments
#DROP TABLE IF EXISTS
wp_comments;You probably deleted that last line…
What it starts with is this:
Table structure for table
wp_comments
—DROP TABLE IF EXISTS
wp_commentsI 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
#Hi, it looks like this:
— phpMyAdmin SQL Dump
— version 2.11.9.5
— http://www.phpmyadmin.net
—
— Host: localhost
— Generation Time: Oct 31, 2009 at 01:12 PM
— Server version: 5.0.81
— PHP Version: 5.2.9SET 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 tablewp_comments
—DROP TABLE IF EXISTS
wp_comments;
CREATE TABLEwp_comments(
comment_IDbigint(20) unsigned NOT NULL auto_increment,
comment_post_IDbigint(20) unsigned NOT NULL default ‘0’,
comment_authortinytext NOT NULL,
comment_author_emailvarchar(100) NOT NULL default ”,
comment_author_urlvarchar(200) NOT NULL default ”,
comment_author_IPvarchar(100) NOT NULL default ”,
comment_datedatetime NOT NULL default ‘0000-00-00 00:00:00’,
comment_date_gmtdatetime NOT NULL default ‘0000-00-00 00:00:00’,
comment_contenttext NOT NULL,
comment_karmaint(11) NOT NULL default ‘0’,
comment_approvedvarchar(20) NOT NULL default ‘1’,
comment_agentvarchar(255) NOT NULL default ”,
comment_typevarchar(20) NOT NULL default ”,
comment_parentbigint(20)Try to remove this:
— phpMyAdmin SQL Dump
— version 2.11.9.5
— http://www.phpmyadmin.net
—
— Host: localhost
— Generation Time: Oct 31, 2009 at 01:12 PM
— Server version: 5.0.81
— PHP Version: 5.2.9SET 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
—
— Host: localhost
— Generation Time: Oct 31, 2009 at 01:12 PM
— Server version: 5.0.81
— PHP Version: 5.2.9SET 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
—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?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.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…;-)
The topic ‘Problems using phpmyadmin to transfer WP databases’ is closed to new replies.