Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

localhost to live site

  • 14-04-2012 3:10am
    #1
    Registered Users, Registered Users 2 Posts: 210 ✭✭


    Iv done a site with wordpress but cant get it form localhost to the live domain


    its the tables i export and when i import i get this message

    Error

    SQL query:
    --
    -- Database: `digital`
    --
    --
    --
    -- Table structure for table `wp_commentmeta`
    --
    IF NOT EXISTS `wp_commentmeta` (
    `meta_id` NOT NULL AUTO_INCREMENT ,
    `comment_id` [URL[/URL]( 20 ) unsigned NOT NULL DEFAULT '0',
    `meta_key` varchar( 255 ) DEFAULT NULL ,
    `meta_value` longtext,
    PRIMARY KEY ( `meta_id` ) ,
    KEY `comment_id` ( `comment_id` ) ,
    KEY `meta_key` ( `meta_key` )
    ) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT =1;

    MySQL said: b_help.png
    #1046 - No database selected

    what would be wrong here?


Comments

  • Registered Users, Registered Users 2 Posts: 7,521 ✭✭✭jmcc


    pjwhite99 wrote: »
    what would be wrong here?
    The remote server may be trying to import the dump without a database being selected. If at command line, the problem would look like this:

    mysql -uUSER -pPASSWORD -hHOST <site.dump.sql

    What it should look like is this:

    mysql digital -uUSER -pPASSWORD -hHOST <site.dump.sql

    USER, PASSWORD, HOST are all just examples.

    If it is using phpAdmin or some control panel import then perhaps some others here could help.

    Regards...jmcc


  • Registered Users, Registered Users 2 Posts: 6,570 ✭✭✭daymobrew


    pjwhite99 wrote: »
    #1046 - No database selected
    If you are using phpMyAdmin you have to select a database before doing the import.

    If you are using mysql command line you need to specify the database name on the command line.


  • Posts: 0 [Deleted User]


    Not related to the issue you're seeing, but you may have problems with this when you get the original problem sorted.

    You'll need to replace localhost with mydomain.com in the database content - there'll be a lot of records to change. There's also the possibility that some of those 'localhost' entries will be serialised, so sql updates or search/replace on the raw sql file will not find them.

    There's an interesting web tool here (chrome only) that seems to do the whole job:
    http://petesaia.com/work/peach/


  • Registered Users, Registered Users 2 Posts: 6,570 ✭✭✭daymobrew


    You'll need to replace localhost with mydomain.com in the database content - there'll be a lot of records to change. There's also the possibility that some of those 'localhost' entries will be serialised, so sql updates or search/replace on the raw sql file will not find them.
    Very good point, especially about the serialised entries.

    When I make such moves (local to live) I open the exported .sql file and search for 'localhost' (or the test domain name) and replace with the live domain. If the entry is serialised you have to adjust the listed string length. There is a WordPress plugin that makes such changes but the name escapes me at the moment (it is not an obvious name unfortunately).


  • Registered Users, Registered Users 2 Posts: 6,570 ✭✭✭daymobrew


    daymobrew wrote: »
    There is a WordPress plugin that makes such changes but the name escapes me at the moment (it is not an obvious name unfortunately).
    It is called Velvet Blues Update URLs


  • Advertisement
Advertisement