• Resolved lubomier

    (@lubomier)


    Hi,

    my old server has been shut down and now I’m in the process of WP migration. I’ve simply copied files form my WP root, and followed manual DB dump this way.

    mysqldump --add-drop-table -h localhost -u root -p wordpress |gzip > root/wordpress-last.gz

    Dump file looks good, but I’m getting always error while importing database to new server:

    $ mysql -u lubomier -p -h localhost lmwordpress < ./wordpress-las
    Enter password:
    ERROR 1067 (42000) at line 113: Invalid default value for 'link_visible'

    I’ve also tryed to set compatible=myslq40 for mysqldump but no success. Source MySQL server version is 5.0.24a-Debian_5~bpo.1-log. Target server is: 5.0.51a-24 (GNU/Debian as well).

    This is faulty part of sql dump file:
    DROP TABLE IF EXISTSwp_links`;
    CREATE TABLE wp_links (
    link_id bigint(20) NOT NULL auto_increment,
    link_url varchar(255) collate ucs2_slovak_ci NOT NULL default ”,
    link_name varchar(255) collate ucs2_slovak_ci NOT NULL default ”,
    link_image varchar(255) collate ucs2_slovak_ci NOT NULL default ”,
    link_target varchar(25) collate ucs2_slovak_ci NOT NULL default ”,
    link_category bigint(20) NOT NULL default ‘0’,
    link_description varchar(255) collate ucs2_slovak_ci NOT NULL default ”,
    link_visible enum(‘Y’,’N’) collate ucs2_slovak_ci NOT NULL default ”,
    link_owner int(11) NOT NULL default ‘1’,
    link_rating int(11) NOT NULL default ‘0’,
    link_updated datetime NOT NULL default ‘0000-00-00 00:00:00’,
    link_rel varchar(255) collate ucs2_slovak_ci NOT NULL default ”,
    link_notes mediumtext collate ucs2_slovak_ci NOT NULL,
    link_rss varchar(255) collate ucs2_slovak_ci NOT NULL default ”,
    PRIMARY KEY (link_id),
    KEY link_category (link_category),
    KEY link_visible (link_visible)
    ) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=ucs2 COLLATE=ucs2_slovak_ci;`

    Thanks for any advice!

    Lubo

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter lubomier

    (@lubomier)

    I’ve manually edited sql dump file, and changed line as follows:

    link_visible enum('Y','N') collate ucs2_slovak_ci NOT NULL default 'N',

    there were few more errors, after changing sql file DB was successfully imported an WP is online!

    okaay

    (@okaay)

    You should try using phpMyAdmin to do the importing. It will save you so much time/head aches!

    [signature moderated Please read the Forum Rules]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Database restore issue [WP migration]’ is closed to new replies.