WordPress.org

Ready to get started?Download WordPress

Forums

Database Errors While Moving from localhost to webhost (4 posts)

  1. sueheap
    Member
    Posted 1 year ago #

    I am trying to move my site to my webhost. I have downloaded the database and edited it to direct to my new URL. When I go to import the database, I get these errors:
    Error
    SQL query:

    --
    -- Database: tranquility
    --
    -- --------------------------------------------------------
    --
    -- Table structure for table tran_assets
    --
    CREATE TABLE IF NOT EXISTS tran_assets (

    id INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
    parent_id INT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Nested set parent.',
    lft INT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.',
    rgt INT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.',
    level INT( 10 ) UNSIGNED NOT NULL COMMENT 'The cached level in the nested tree.',
    name VARCHAR( 50 ) NOT NULL COMMENT 'The unique name for the asset.\n',
    title VARCHAR( 100 ) NOT NULL COMMENT 'The descriptive title for the asset.',
    rules VARCHAR( 5120 ) NOT NULL COMMENT 'JSON encoded access control.',
    PRIMARY KEY ( id ) ,
    UNIQUE KEY idx_asset_name ( name ) ,
    KEY idx_lft_rgt ( lft , rgt ) ,
    KEY idx_parent_id ( parent_id )
    ) ENGINE = INNODB DEFAULT CHARSET = utf8 AUTO_INCREMENT =174;

    MySQL said:

    #1046 - No database selected

    I hope someone can help me..thanks in advance

  2. codingpet
    Member
    Posted 1 year ago #

    have you imported the sql file in the correct database? You need to navigate to the proper database and then try to import the .sql file. You can't import it in the root of phpmyadmin. Not sure if this is your problem.

  3. sueheap
    Member
    Posted 1 year ago #

    I didn't..I'll try it and let you know. Thanks

  4. sueheap
    Member
    Posted 1 year ago #

    it worked!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.