We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7131
    • 83 Posts
    I’m trying to move a site for my local server to the web. I exported the MySQL file and copied the code using phpmyadmin. The first table can not be created. I read that MySQL 3.23 should work fine with MODx. the server is on MySQL 3.23.58



    Erreur

    requête SQL :

    CREATE TABLE `modx_active_users` (
    `internalKey` int( 9 ) NOT NULL default ’0’,
    `username` varchar( 50 ) NOT NULL default ’’,
    `lasthit` int( 20 ) NOT NULL default ’0’,
    `id` int( 10 ) default NULL ,
    `action` varchar( 10 ) NOT NULL default ’’,
    `ip` varchar( 20 ) NOT NULL default ’’,
    PRIMARY KEY ( `internalKey` )
    )ENGINE = MYISAM DEFAULT CHARSET = latin1 COMMENT = ’Contains data about active users.’

    MySQL a répondu:

    #1064 - You have an error in your SQL syntax near ’ENGINE = MYISAM DEFAULT CHARSET = latin1 COMMENT = ’Contains data about acti’ at line 7



    Thanks!
      at the edge of dawn,
      you ask yourself if your shadow did follow you down
      all night long
    • The database you are migrating from is a different version; do a search/replace in the sql file to change the ENGINE= to TYPE=

      The ENGINE and TYPE options specify the storage engine for the table. ENGINE was added in MySQL 4.0.18 (for 4.0) and 4.1.2 (for 4.1). It is the preferred option name as of those versions, and TYPE has become deprecated. TYPE is supported throughout the 4.x series, but likely will be removed in the future.

      There may be other problems with the default charset declaration as well.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • If you have a recent version of phpmyadmin, there is a SQL export compatability drop down on the export screen that can generate the SQL for older versions, but you’ll have to be careful with certain syntaxes, even when using this. I believe last time i did this I had to edit the SQL to add back the auto_increment values when exporting to 3.x
          • 7131
          • 83 Posts
          Thanks. It worked using phpmyadmin tool. But...

          1- For the MySQL code to compute, I had to remove all COMMENT parts, i.e. COMMENT ’...’ and COMMENT=’...’
          Will the site work fine anyway?

          2- I couldn’t export "é", "à" and other french characters. I had some funny é and À to search and replace.
            at the edge of dawn,
            you ask yourself if your shadow did follow you down
            all night long