1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Database migration

Discussion in 'XenForo Questions and Support' started by CLMontague, Apr 14, 2014.

  1. CLMontague

    CLMontague New Member

    Hello,

    I have moved a database of my forum to another MySql database and its failing with

    '
    Error
    SQL query:

    --
    -- Database: `db_forum`
    --
    -- --------------------------------------------------------
    --
    -- Table structure for table `EWRporta_blocks`
    --
    CREATE TABLE IF NOT EXISTS `EWRporta_blocks` (

    `block_id` VARCHAR( 25 ) NOT NULL ,
    `title` VARCHAR( 75 ) NOT NULL ,
    `version_string` VARCHAR( 30 ) NOT NULL ,
    `version_id` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0',
    `url` VARCHAR( 100 ) NOT NULL ,
    `install_callback_class` VARCHAR( 75 ) NOT NULL ,
    `install_callback_method` VARCHAR( 75 ) NOT NULL ,
    `uninstall_callback_class` VARCHAR( 75 ) NOT NULL ,
    `uninstall_callback_method` VARCHAR( 75 ) NOT NULL ,
    `cache` VARCHAR( 255 ) NOT NULL DEFAULT '+10 minutes',
    `display` ENUM( 'show', 'hide' ) NOT NULL ,
    `groups` VARCHAR( 255 ) NOT NULL ,
    `locked` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0',
    `active` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '1',
    PRIMARY KEY ( `block_id` ) ,
    KEY `title` ( `title` )
    )ENGINE=INNODBDEFAULTCHARSET=utf8;



    MySQL said: [​IMG]

    #1046 - No database selected


    I have exported and imported them before without an issue is any one able to help??
     
  2. 0ptima

    0ptima Well-Known Member

    Which tool are you using to do the import?
     
  3. You need to select the database first, if you're running the SQL/import using phpMyAdmin just click on the database name first before going to the SQL or Import tab.
     
  4. CLMontague

    CLMontague New Member

    Thanks for your help it turns out it was a user error its been a wile since iv moved DB with phpMyAdmin!
     
  5. Tracy Perry

    Tracy Perry Well-Known Member

    mysql -p dbname < dbname.sql
    works for me. :p
     
  6. :whistle:
     
  7. Tracy Perry

    Tracy Perry Well-Known Member

    I never worry about the username since I've already created the DB and assigned permissions. Just import it as root and good to go.
    I've honestly gotten where I hate phpMyAdmin.
     
    DeviateDefiant likes this.
  8. Yeah I'm quite the same, it's useful for browsing/digesting information but the command line and manual SQL queries do the real work.
     

Share This Page