Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-05-23 06:44:46

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

Re: Moving servers

hcgtv wrote:

There is an import, this is the menu when you enter into an empty database: * Structure * SQL * Search * Query * Export * Import * Operations * Privileges * Drop

? All I have is Structure – SQL – Export – Search – Query – Operations – Drop (phpMyAdmin 2.6.3-pl1)

puthuba: This is the right sequence:
  1. create new database
  2. install Txp (this will create tables in the database)
  3. import old database

If you get the message that the database can’t be created because it already exists, then probably instead of importing the old database you are trying to create it again (what the import does, or should do, is just filling the new database with your old data).

Offline

#14 2006-05-26 17:34:32

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

Re: Moving servers

it is the import option that i’ve tried, resulting in this error (db can’t be created):

Error

SQL query:

— 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` ;

MySQL said: Documentation
  1. - Access denied for user ‘myUsername’@‘myIP’ to database ‘db131679680’

<br /><br />
i replaced data referring to my old server with data referring to the new server, and pretty much got the same result, except this time the db already exists:

Error

SQL query:

— phpMyAdmin SQL Dump
— version 2.6.4-pl3
— http://www.phpmyadmin.net

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

— Database: `myNewDB`

CREATE DATABASE `myNewDB` ;

MySQL said: Documentation
  1. - Can’t create database ‘myNewDB’; database exists

<br /><br />
i have no idea about mysql – what’s the ‘Importing for Dummies’ set of instructions ;-)

Last edited by puthupa (2006-05-26 17:51:44)


arp laszlo
www.inkwire.net

Offline

#15 2006-05-27 17:03:54

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

Re: Moving servers

4 – Access denied for user ‘myUsername’@‘myIP’ to database ‘db131679680’

It’s trying to create a new database named “db131679680”, but I would assume it already exists? or your user isn’t allowed to create a new database.

Offline

#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

Board footer

Powered by FluxBB