Jump to content
TNG Community
Sign in to follow this  
MVB

changing the database name

Recommended Posts

MVB

Hi,

I am trying out TNG and have integrated it with Wordpress.

When I installed Wordpress I created a database, then later on when I installed TNG I created a second database for it.

I have now read that the website will load faster if both packages are using the same database.

 

My question:

I have already started with inputting data for my family tree, can I simply and safely change the database name, username etc to the one used by Wordpress?

Or will I lose all my data?

 

Thanks in advance

Share this post


Link to post
Share on other sites
theKiwi

You can't just change the database name - since the WordPress database won't contain all the tables needed for TNG, so if you do change the name, username etc it will seem that you have lost all your data.

I don't know enough about MySQL to know how to go about merging two databases into a single one.

My sites use two separate databases for WordPress and TNG, and they seem to load OK for  me.

Roger

Share this post


Link to post
Share on other sites
Ken Roy

You could use TNG Admin > Utilities to create a backup of your TNG database and then change the Admin Setup > Database to point to your Word Press database and go to Admin Utilities and restore your TNG backups.  Note that I do not use Word Press, but have used backups from one database to restore into another database for testing.

Share this post


Link to post
Share on other sites
theKiwi
4 hours ago, Ken Roy said:

You could use TNG Admin > Utilities to create a backup of your TNG database and then change the Admin Setup > Database to point to your Word Press database and go to Admin Utilities and restore your TNG backups.  Note that I do not use Word Press, but have used backups from one database to restore into another database for testing.

I'm not sure that doing this wouldn't destroy the WordPress database - since you'd be replacing the contents of the WordPress database with the TNG database - assuming it even would work because the TNG table names don't exist in the WordPress database.

Roger

Share this post


Link to post
Share on other sites
Ken Roy

I do not think that would destroy the WordPress database.  The table restore in TNG restores tables.  I know for sure that you could use MySQLDumper to backup the TNG database and then select the tables you want to restore into the WordPress database.

Of course one should always do database backups before attempting any of this.

Share this post


Link to post
Share on other sites
MVB

Thanks for your replies,

I was able to simply export the TNG database and import it within the existing WP database. I left the table names intact.

In TNG admin I changed the database name, and there was no problem at all.

thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×