We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15159
    • 93 Posts
    Anyone have ANY success importing tables from SQL query using either modx/builtin table export or Phpmyadmin type of export? When I try to import the exported tables I get...

    -- Table structure for table `modx_active_users`
    --
    CREATE TABLE IF NOT EXISTS `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 said: Documentation
    #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 COMMENT=’Contains data about active user

    Nuts....

    JT
    • This is an issue with different versions of MySQL. You’ll need to edit that part of each CREATE query to conform with the requirements of the version you are uploading to. If you export your existing database with phpMyAdmin, there is an option for exporting to different versions of mySQL.
        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
        • 6726
        • 7,075 Posts
        Agreed those problems can drive you nuts (imagine what us french users with accented characters have to say about this tongue ) ... definitely use phpMyAdmin.

        I confirm what Susan says I found selecting compatibility with "MYSQL40" very helpful (especially since it has a great influence on character encoding, DEFAULT CHARSET = latin1 is not supported with version anterior to mySQL 4.1.x...) , you can even select MYSQL323 setting for compatibility with MySQL 3.23 for cheap hosting services... It should do the trick...


          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 15159
          • 93 Posts
          Susan, David,

          I cant even begin to tell how much I love you people. Dang but this community rocks!