Web based family history software

This Help forum is for issues relates to the latest release (1.0). For issues related to beta or svn version please use their own Help forum.
When requesting help please provide as much information as possible. Explain what version of webtrees, PHP and MYSQL you are using. If possible provide a URL to your site so we can see the problem first-hand.
Tip: Think about putting these details in your signature, so it appears in the footer of ALL your messages

Question Export/Import database via phpmyadmin

  • rocker99
  • Topic Author
  • Away
  • Junior Member
  • Junior Member
More
13 years 1 month ago #1 by rocker99
Export/Import database via phpmyadmin was created by rocker99
Since I first posted a few months back I have been enjoying exploring webtrees functionality and liking it more every day. I am almost at the point to devote myself totally, but I have come across a small snag.

I'm using wampserver currently, and I wanted to test an export of my data. I used phpmyadmin to Export SQL data (using default settings), and then attempted to import onto another computer (also using wampserver). There was an error on wt_block table. I then attempted to import the same data using MoWeS on a USB key, and received a similar error. So I'm thinking maybe there is something wrong with my source data, or the way I am exporting?

I have to admit that I may be totally out of my depth here, because I don't know much about MySQL or phpmyadmin, or even wampserver, but I thought that export using phpmyadmin was 'painless' and 'one click'.

The last error message I received is below (this was an attempt to import via phpmyadmin using MoWeS as server)
(note that I have no trouble importing/exporting via GEDCOM using either wampserver or MoWeS, or creating new family trees/GEDCOMs)

Does anyone have any suggestions?


- Table structure for table `wt_block`
--
CREATE TABLE IF NOT EXISTS `wt_block` (

`block_id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`gedcom_id` INT( 11 ) DEFAULT NULL ,
`user_id` INT( 11 ) DEFAULT NULL ,
`xref` VARCHAR( 20 ) COLLATE utf8_unicode_ci DEFAULT NULL ,
`location` ENUM( 'main', 'side' ) COLLATE utf8_unicode_ci DEFAULT NULL ,
`block_order` INT( 11 ) NOT NULL ,
`module_name` VARCHAR( 32 ) COLLATE utf8_unicode_ci NOT NULL ,
PRIMARY KEY ( `block_id` ) ,
KEY `fk1` ( `gedcom_id` ) ,
KEY `fk2` ( `user_id` ) ,
KEY `fk3` ( `module_name` )
) ENGINE = INNODB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT =16;

MySQL said:

#1046 - No database selected

Kevin
Running latest version at www.familytreehq.com

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #2 by fisharebest
Replied by fisharebest on topic Re: Export/Import database via phpmyadmin
When you use phpMyAdmin to export a database, it does not include the SQL command "USE <database>". This is so you can import the data into another database with a different name.

So, to import, you must first select a database.

If you are using phpMyAdmin to import, you get the choice of running import from both the main menu, and also from a database menu.

Select (or create) and empty database first, then import the script. It should work.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • rocker99
  • Topic Author
  • Away
  • Junior Member
  • Junior Member
More
13 years 1 month ago #3 by rocker99
Replied by rocker99 on topic Re: Export/Import database via phpmyadmin
@fisharebest, you're a legend! Thanks very much!

I see where I was going wrong now. It's all about logic really, once you think about it.

I was attempting to import into an existing database, rather than a brand new empty database.

Cheers

Kevin

Kevin
Running latest version at www.familytreehq.com

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}