Subscribe: RSS
  • modx 1.0.5
    WAMP
    Windows XP SP 3
    Apache 2.2.17
    MySQL 5.5.8
    PHP 5.3.5
    Firefox 3.6.13

    I found this problem in the forums from a few years ago for previous releases of modx, but none of the suggestions there seemed to help.

    I get through the add database part just fine, and all the checks performed come out OK, but when I click "install" I get the following error:

    MODx setup couldn’t install/alter some tables inside the selected database.

    This is followed by several pages of SQL errors, of which I will post the first few:

    ======================================
    The following errors had occurred during installation

    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 ’TYPE=MyISAM COMMENT=’Contains data about active users.’’ at line 9 during the execution of SQL statement CREATE TABLE IF NOT EXISTS `mcc_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`) ) TYPE=MyISAM COMMENT=’Contains data about active users.’.
    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 ’Type=MyISAM COMMENT=’Categories to be used snippets,tv,chunks, etc’’ at line 5 during the execution of SQL statement CREATE TABLE IF NOT EXISTS `mcc_categories` ( `id` integer NOT NULL AUTO_INCREMENT, `category` varchar(45) NOT NULL DEFAULT ’’, PRIMARY KEY(`id`) ) Type=MyISAM COMMENT=’Categories to be used snippets,tv,chunks, etc’.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 ’TYPE=MyISAM COMMENT=’Contains data used for access permissions.’’ at line 8 during the execution of SQL statement CREATE TABLE IF NOT EXISTS `mcc_document_groups` ( `id` int(10) NOT NULL auto_increment, `document_group` int(10) NOT NULL default ’0’, `document` int(10) NOT NULL default ’0’, PRIMARY KEY (`id`), KEY `document` (document), KEY `document_group` (document_group) ) TYPE=MyISAM COMMENT=’Contains data used for access permissions.’.
    ======================================

    As I say, there are several pages of these errors. I’ve tried re-starting from scratch a few times, but nothing so far has made a difference.

    All databases are English only (some previous instances of this problem appeared to be language related) and the account through which I am connecting has full privileges to everything.

    Any suggestions?

    Many thanks,

    - Dave
    • This is a known issue with the combination of MySQL 5.5.8 and PHP 5.3.4+
      Some googling shows that it extends beyond MODX.

      Another user recently posted this as well
      http://modxcms.com/forums/index.php?topic=60114.0

      Are you able to change your MySQL version?
        Mike Schell
        MODX Cloud Lead
        Email: mike@modx.com
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
      • Re: change MySQL version.

        Possibly, but not easily... I installed it as part of the over all WAMP installation but I’ll see what I can find out about re-installing just the database component. Thanks for the information!

        - Dave
        • Re: different version of MySQL

          I was able to find an earlier version of MySQL (5.1.41) and that has indeed fixed the problem!

          Thank you very much for the help... saved me many hours of frustration!

          - Dave
          • I had the same error with the following config:
            PHP Version 5.2.17
            MySQL Server: 5.5.8
            MySQL Client: 5.0.51a
            PDO Driver for MySQL: 5.0.51a
            MODx 1.0.5
            IIS6
            Win 2003

            Managed to fix it by moding the install/setup.sql replacing TYPE=MyISAM with ENGINE=MyISAM
            I don’t know if this will give me issues later but appears to work ok at the mo.
            Only tried that as that’s what appears in the database backup output.

            Regards
            Keith
            • That won’t make any difference at all; it’s just that the different versions of MySQL require the different wording.

              The docs for version 5.0 say the TYPE keyword is supported as a synonym for backwards compatibility, but the 5.1 and 5.5 docs don’t mention TYPE at all.

              As of 5.5.5 the default engine was changed from MyISAM to InnoDB. Something to keep in mind when creating a new database on 5.5.5 or greater.
                I don't usually get involved in religious or political issues, but having survived an abusive childhood, this touches close to home. https://www.facebook.com/StealthyFreedom
              • Do you know if this default MySQL change from MyISAM to InnoDB is related to the installation problem? If so, what is the likely way forward from this point? Presumably people won’t have the option to stay on earlier releases of MySQL forever... for example, I’m doing my development right now on a local WAMP installation, but when I go to port it to our Web hosting service I will not have control over which version of MySQL they have installed, and I’m guessing they will be staying fairly current.

                - Dave
                • Hi all MODx Fans cool Had same problem, and basicly what we can do for the moment is to changed 3 sql files:

                  /assets/snippets/jot/includes/jot.install.db.sql
                  /install/setup.data.sql
                  /install/setup.sql

                  ... and all install SQL files from new stuff, you will install in the future.

                  This is my solution, tested couple days, it still works smiley



                  By the way if you upgrade from 1.04 to 1.05 there won’t be any problems. If you install previous version of modx (ex. 1.04) problem will back.

                  My server provider told me they can’t go back to previous release of MYSQL server... so I didn’t have other choices wink
                  • Hi
                    What did you change in
                    Quote from: godziniak at Feb 21, 2011, 04:20 AM
                    ...
                    /assets/snippets/jot/includes/jot.install.db.sql
                    /install/setup.data.sql
                    ...
                    As I’d not spotted either of those and my install appears to be ok.

                    Regards
                    Keith.
                    • Quote from: RMPnet at Feb 21, 2011, 06:17 AM

                      Hi
                      What did you change in
                      Quote from: godziniak at Feb 21, 2011, 04:20 AM
                      ...
                      /assets/snippets/jot/includes/jot.install.db.sql
                      /install/setup.data.sql
                      ...
                      As I’d not spotted either of those and my install appears to be ok.

                      Regards
                      Keith.

                      You need to change the above two files in the same way as RMPnet suggested:

                      > Managed to fix it by moding the install/setup.sql replacing TYPE=MyISAM with ENGINE=MyISAM

                      So, I needed to replace the words TYPE=MyISAM with ENGINE=MyISAM in the following files to get ModX 1.0.5 to install the Sample site on my XAMMP webserver version 1.7.4 (MySQL 5.5.8 and PHP 5.3.5):

                      install/setup.sql
                      assets/snippets/jot/includes/jot.install.db.sql
                      install/setup.data.sql