Error: Importing Database
  • After providing correct parameters during installation I get the following warning:

    Error: Importing Database
    CREATE TABLE `LocationContents` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `poi_name` varchar(1023) NOT NULL, `poi_link` varchar(1023) NOT NULL DEFAULT '', `poi_perex` varchar(15100) NOT NULL DEFAULT '', `poi_content_type` tinyint(4) NOT NULL DEFAULT '0', `poi_content` text NOT NULL, `poi_text` text NOT NULL, `IdUser` int(10) unsigned NOT NULL DEFAULT '0', `time_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `location_contents_poi_name` (`poi_name`(64)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
    -- -- Dumping data for table `LocationContents` -- LOCK TABLES `LocationContents` WRITE
    /*!40000 ALTER TABLE `LocationContents` DISABLE KEYS */
    /*!40000 ALTER TABLE `LocationContents` ENABLE KEYS */
    CREATE TABLE `Multimedia` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `media_type` varchar(255) NOT NULL DEFAULT '', `media_spec` varchar(255) NOT NULL DEFAULT '', `media_src` varchar(1023) NOT NULL DEFAULT '', `media_height` int(11) NOT NULL DEFAULT '0', `media_width` int(11) NOT NULL DEFAULT '0', `options` varchar(1023) NOT NULL DEFAULT '', `IdUser` int(10) unsigned NOT NULL DEFAULT '0', `time_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `multimedia_media_type` (`media_type`(32)), KEY `multimedia_media_src` (`media_src`(64)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
    -- -- Dumping data for table `Multimedia` -- LOCK TABLES `Multimedia` WRITE
    /*!40000 ALTER TABLE `Multimedia` DISABLE KEYS */
    /*!40000 ALTER TABLE `Multimedia` ENABLE KEYS */
  • 17 Comments sorted by
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    is it appearing each time during installation?
  • Yes, it does. I can't get through the database settings
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    could you try to import database from dump file (just for checking)?
    mysql -u user_name -p database_name < newscoop/install/sql/campsite_core.sql


  • I am installing it on a host computer. The database shows 122 tables, is that corret?
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    no, should be 124. It seems that both tables LocationContents and Multimedia are not imported. Please check. Which mysql version you are using?

  • You are correct

    the MySQL version is MySQL client version: 5.0.32
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    could you try sql commands:
    CREATE TABLE `LocationContents` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `poi_name` varchar(1023) NOT NULL, `poi_link` varchar(1023) NOT NULL DEFAULT '', `poi_perex` varchar(15100) NOT NULL DEFAULT '', `poi_content_type` tinyint(4) NOT NULL DEFAULT '0', `poi_content` text NOT NULL, `poi_text` text NOT NULL, `IdUser` int(10) unsigned NOT NULL DEFAULT '0', `time_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `location_contents_poi_name` (`poi_name`(64)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

    and
    CREATE TABLE `Multimedia` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `media_type` varchar(255) NOT NULL DEFAULT '', `media_spec` varchar(255) NOT NULL DEFAULT '', `media_src` varchar(1023) NOT NULL DEFAULT '', `media_height` int(11) NOT NULL DEFAULT '0', `media_width` int(11) NOT NULL DEFAULT '0', `options` varchar(1023) NOT NULL DEFAULT '', `IdUser` int(10) unsigned NOT NULL DEFAULT '0', `time_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `multimedia_media_type` (`media_type`(32)), KEY `multimedia_media_src` (`media_src`(64)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

    what is the error?



  • On the first I get:

    SQL query:

    CREATE TABLE `LocationContents` (
    `id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
    `poi_name` varchar( 1023 ) NOT NULL ,
    `poi_link` varchar( 1023 ) NOT NULL DEFAULT '',
    `poi_perex` varchar( 15100 ) NOT NULL DEFAULT '',
    `poi_content_type` tinyint( 4 ) NOT NULL DEFAULT '0',
    `poi_content` text NOT NULL ,
    `poi_text` text NOT NULL ,
    `IdUser` int( 10 ) unsigned NOT NULL DEFAULT '0',
    `time_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
    PRIMARY KEY ( `id` ) ,
    KEY `location_contents_poi_name` ( `poi_name` ( 64 ) )
    ) ENGINE = MYISAM DEFAULT CHARSET = utf8

    MySQL said: Documentation
    #1074 - Column length too big for column 'poi_link' (max = 255); use BLOB or TEXT instead
  • The second says:

    SQL query:

    CREATE TABLE `Multimedia` (
    `id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
    `media_type` varchar( 255 ) NOT NULL DEFAULT '',
    `media_spec` varchar( 255 ) NOT NULL DEFAULT '',
    `media_src` varchar( 1023 ) NOT NULL DEFAULT '',
    `media_height` int( 11 ) NOT NULL DEFAULT '0',
    `media_width` int( 11 ) NOT NULL DEFAULT '0',
    `options` varchar( 1023 ) NOT NULL DEFAULT '',
    `IdUser` int( 10 ) unsigned NOT NULL DEFAULT '0',
    `time_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
    PRIMARY KEY ( `id` ) ,
    KEY `multimedia_media_type` ( `media_type` ( 32 ) ) ,
    KEY `multimedia_media_src` ( `media_src` ( 64 ) )
    ) ENGINE = MYISAM DEFAULT CHARSET = utf8

    MySQL said: Documentation
    #1074 - Column length too big for column 'media_src' (max = 255); use BLOB or TEXT instead
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    hmm,
    I've found that limitation was prior 5.0.3:
    Quote:
    A variable-length string. M represents the maximum column length in characters. In MySQL 5.0, the range of M is 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in MySQL 5.0.3 and later. The effective maximum length of a VARCHAR in MySQL 5.0.3 and later is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used. For example, utf8 characters can require up to three bytes per character, so a VARCHAR column that uses the utf8 character set can be declared to be a maximum of 21,844 characters.
    http://dev.mysql.com/doc/refman/5.0/en/string-type-overview. html

    May be you checked before mysql client version. The client version and server version could be different.
  • You are correct. Unfortunately the only solution my host can suggest is to open a new account with the correct MySQL.

    Any ideas about how to get around this problem?
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    So, new host account with right mysql is bad idea?
  • I would have to move my main site (http://maritimeaccident.org), which run on Wordpress and, of course, it is an extra expense for something which, at the moment, is experimental.

  • Sadly I'm going to have to set aside Campsite/Newscoop until I have the financial whetherwithal or decided to change hosts. I wish the project all the best and hope to return to it at a future date.

    Thanks for all the fish.
  • Can anyone help me with the installation, it got stuck and I can not solve the problem:

    Error: Importing Database
    CREATE TABLE IF NOT EXISTS `user_identity` ( `provider` varchar(80) NOT NULL, `provider_user_id` varchar(255) NOT NULL, `user_id` int(11) unsigned NOT NULL, PRIMARY KEY (`provider`, `provider_user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8

  • hi, what is your mysql version? it might be this innodb engine.
  • Msql version 5.1.  and PHP version
    5.3.6
    Post edited by apooka at 2013-03-01 11:14:40