Moved hosts.Can't rebuild db.

Discussion in 'Troubleshooting' started by plrtravelarticles, Oct 7, 2006.

  1. plrtravelarticles

    plrtravelarticles New Member

    Joined:
    Sep 20, 2006
    Messages:
    2
    Hi.
    I need urgent help with rebuilding the db after host transfer.
    I keep getting errors.

    Here's the error:

    SQL query:

    CREATE TABLE `amember_access_log` (

    `log_id` int( 11 ) NOT NULL AUTO_INCREMENT ,
    `member_id` int( 11 ) NOT NULL default '0',
    `time` timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
    `url` varchar( 255 ) default NULL ,
    `remote_addr` varchar( 15 ) default NULL ,
    `referrer` varchar( 255 ) default NULL ,
    PRIMARY KEY ( `log_id` ) ,
    KEY `member_id` ( `member_id` , `time` , `remote_addr` ) ,
    KEY `time` ( `time` )
    ) ENGINE = MYISAM AUTO_INCREMENT =352DEFAULT CHARSET = latin1;



    MySQL said:
    #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
    `url` varchar(


    I edited sql file and removed all "default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP" from it.
    Then i got this error:

    SQL query:

    CREATE TABLE `amember_access_log` (
    `log_id` int( 11 ) NOT NULL AUTO_INCREMENT ,
    `member_id` int( 11 ) NOT NULL default '0',
    `time` timestamp NOT NULL ,
    `url` varchar( 255 ) default NULL ,
    `remote_addr` varchar( 15 ) default NULL ,
    `referrer` varchar( 255 ) default NULL ,
    PRIMARY KEY ( `log_id` ) ,
    KEY `member_id` ( `member_id` , `time` , `remote_addr` ) ,
    KEY `time` ( `time` )
    ) ENGINE = MYISAM AUTO_INCREMENT =352DEFAULT CHARSET = latin1;



    MySQL said: #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1' at line 11

    If someone can help it will be very much appreciated.I't s kinda urgent.
  2. plrtravelarticles

    plrtravelarticles New Member

    Joined:
    Sep 20, 2006
    Messages:
    2
    I changed the code to this:

    CREATE TABLE `amember_access_log` (
    `log_id` int( 11 ) NOT NULL AUTO_INCREMENT ,
    `member_id` int( 11 ) NOT NULL default '0',
    `time` timestamp NOT NULL ,
    `url` varchar( 255 ) default NULL ,
    `remote_addr` varchar( 15 ) default NULL ,
    `referrer` varchar( 255 ) default NULL ,
    PRIMARY KEY ( `log_id` ) ,
    KEY `member_id` ( `member_id` , `time` , `remote_addr` ) ,
    KEY `time` ( `time` )
    ) ;


    I also made sure that in the file it's "352 DEFAULT CHARSET = latin1;"
    It is.Yet when importing it i keep getting the error :
    `referrer` varchar( 255 ) default NULL ,
    PRIMARY KEY ( `log_id` ) ,
    KEY `member_id` ( `member_id` , `time` , `remote_addr` ) ,
    KEY `time` ( `time` )
    ) ENGINE = MYISAM AUTO_INCREMENT =352DEFAULT CHARSET = latin1;


    Any suggestions?
  3. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Resolved in Skype.

Share This Page