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
  • Page:
  • 1

TOPIC:

Export/Import database via phpmyadmin 10 years 2 months ago #1

  • rocker99
  • rocker99's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 105
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.

Re: Export/Import database via phpmyadmin 10 years 2 months ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14515
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 - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

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

Re: Export/Import database via phpmyadmin 10 years 2 months ago #3

  • rocker99
  • rocker99's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 105
@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.

  • Page:
  • 1
Powered by Kunena Forum