Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-01-21 12:46:15

zeeforel
Member
From: Nieuwerkerk a/d IJssel, NL
Registered: 2004-10-16
Posts: 92
Website

Migrating database to exisiting installation with has other account&pw

Dear all,

I am trying to set a copy of my production TxP database on a test install of TxP which already has an empty database but with another username& password combination than that copy of production. How do I proceed?

Should I make sure that during the migration and execution of the sql import script the user table of the copy is not migrated? Or is there another more easy way?

Many thanks in advance.

Last edited by zeeforel (2009-01-21 15:08:43)

Offline

#2 2009-01-21 15:04:55

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,730
Website

Re: Migrating database to exisiting installation with has other account&pw

You say your installation is empty, so I think you actually mean the password for your mysql database. You set that database user and pass in config.php on your new installation and don’t need to worry about txp users at all. That may answer your question already.

If you do mean you already have a txp_users table on the installation you are moving to that you want to keep, I guess there are two ways:

  1. in the database where you want to keep your txp logins, first export the txp_users table including the DROP TABLE option (make sure it’s only the txp_users table not the whole database). Then import your new database in its entirety, then import the txp_users table you have just exported back over it.
  2. when you export the txp database you are planning to migrate, open the .sql file it creates and delete the portion with the txp_users table. Then import into your new install and it will overwrite only the other database tables.

See also this textbook article on moving an installation from one host to another. As always make copies of your databases in case something goes awry.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2009-01-21 15:08:22

zeeforel
Member
From: Nieuwerkerk a/d IJssel, NL
Registered: 2004-10-16
Posts: 92
Website

Re: Migrating database to exisiting installation with has other account&pw

Thanks Jacob. This was exactly what I needed to know!

Offline

Board footer

Powered by FluxBB