Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2006-05-27 17:14:10

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Moving servers

This could be the same problem I’m having with phpMyAdmin on another host: even if I uncheck ‘drop database’ and ‘drop table’ when exporting, the dump file still contains the parts to create the database and the tables. If I manually remove these parts, I can import it.

Can you see in your dump if this is also the case for you, puthupa?

Offline

#17 2006-05-28 18:18:27

puthupa
Member
From: ny
Registered: 2004-10-07
Posts: 27
Website

Re: Moving servers

ok – i saw the part in the dump where it says ‘create database,’ as shown below. can i safely remove that?
1:
— phpMyAdmin SQL Dump
— version 2.6.4-pl3
— http://www.phpmyadmin.net

— Host: db202.perfora.net
— Generation Time: May 14, 2006 at 09:13 PM
— Server version: 4.0.25
PHP Version: 4.3.10-2

— Database: `db131679680`

CREATE DATABASE `db131679680`;
USE db131679680;


arp laszlo
www.inkwire.net

Offline

#18 2006-05-28 22:05:22

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Moving servers

That’s right. Remove the lines at the beginning of the file starting with
<pre>CREATE DATABASE
USE …</pre>

and also everything after
<pre>— Table structure for table `name_of_table`</pre>
and beginning with
<pre>CREATE TABLE `name_of_table`( </pre>
And so for every table.
Just keep the parts after
<pre>— Dumping data for table `name_of_table`</pre>

Last edited by els (2006-05-28 22:06:20)

Offline

#19 2006-05-28 22:26:40

puthupa
Member
From: ny
Registered: 2004-10-07
Posts: 27
Website

Re: Moving servers

ok – we’ve got some progress since the error changed. thanks for all the help so far.

Error

SQL query:

— ————————————————————————————


— Dumping data for table `txp_category`

INSERT INTO `txp_category` ( `id` , `name` , `type` , `parent` , `lft` , `rgt` , `title` , `idx` )
VALUES ( 15, ‘root’, ‘file’, ‘’, 1, 2, ‘root’, NULL ) ;

MySQL said: Documentation
  1. - Unknown column ‘idx’ in ‘field list’

arp laszlo
www.inkwire.net

Offline

#20 2006-05-29 07:18:14

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Moving servers

I do not advise installing Textpattern a second time: it is unnecessary and will cause problems (i.e: “Unknown column…”) if not done “just so”, as the database is modified the first time you login (it runs all the scripts in the “update” directory), not only inserting data but also altering tables.

Rather than export from the main database listing display as that wiki page shows, view the individual database and click that export link. If you do the first, you’ll end up with database creation data added, which can confuse things easily as we’ve seen here.

I suspect that’s the problem puthupa has run into: a combination of total database export combined with overwriting a freshly installed Txp database.

puthupa, do you still have your original database export data?

Offline

#21 2006-05-29 14:31:36

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Moving servers

Mary wrote:

Rather than export from the main database listing display as that wiki page shows, view the individual database and click that export link.

Duh, that was all. Thanks Mary.

Offline

#22 2006-05-30 18:57:48

puthupa
Member
From: ny
Registered: 2004-10-07
Posts: 27
Website

Re: Moving servers

i do seem to have access to the old db. so what i should do is to click the Databases link from ‘that wiki page’ to view the list of dbs, click on the specific db and then click Export? instead of the Export field showing the list of dbs, it shows the list of txp-related stuff (one ‘textpattern’ category and a bunch of ‘txp_xxx’ categories). do i select all of those categories? should anything special be selected in the SQL options area?


arp laszlo
www.inkwire.net

Offline

#23 2006-05-30 19:49:15

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Moving servers

This works for me.

Offline

#24 2006-05-30 20:12:07

puthupa
Member
From: ny
Registered: 2004-10-07
Posts: 27
Website

Re: Moving servers

Error:

MySQL said: Documentation
  1. - Table ‘textpattern’ already exists

<br /><br />
i followed the settings on the gif (which were the default settings in mysql). should it be trying to create tables?


arp laszlo
www.inkwire.net

Offline

#25 2006-05-30 20:27:27

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Moving servers

No it shouldn’t create tables. These are created when Txp is installed. Sorry about this, what version of phpMyAdmin are you using? They do differ a bit, maybe I got them mixed up.

Offline

#26 2006-05-30 22:40:14

puthupa
Member
From: ny
Registered: 2004-10-07
Posts: 27
Website

Re: Moving servers

thanks for your help – and patience. version seems to be 2.6.4:

https://phpmyadmin.1and1.com/Documentation.html


arp laszlo
www.inkwire.net

Offline

#27 2006-05-31 13:28:05

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Moving servers

Mine are 2.6.3-pl1 and 2.6.4-pl1, yours is 2.6.4-pl3. I don’t expect there can be much difference, so I probably overlooked something.

One more try ;)
If you check ‘Add DROP TABLE’ it will delete the tables before creating new ones.
And if you check ‘Add IF NOT EXISTS’ it will only create the tables if they do not exist already.
This time I tried both, honestly, and both work. Choose one of them.

Offline

Board footer

Powered by FluxBB