We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    Or use Vapor to move sites.
      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
      • 26027
      • 145 Posts
      Quote from: sottwell at Jun 10, 2013, 11:06 PM
      Yes, I did some checking on the latest version, and it appears that it adds that line in the background. The only solution I saw was a hack of the code, which of course is not an option if you're using it from a shared hosting control panel.
      Susan, I had a lengthy session yesterday with one of the hosting company's technicians. He seems open to making this problem go away. Can you elaborate upon or provide a link to the hack you referred to above?

      Thanks for your interest and your help ... Sam
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        From a stackoverflow response I found via Google - http://stackoverflow.com/questions/16892806/how-to-remove-create-database-if-not-exists-statement-from-export-in-phpmyadmi
        This behavior did not happen by default in version 3. A quick fix, actually a hack and thus not the desirable solution, is to edit the export class file located in libraries/plugins/export/ExportSql.class.php and force the CREATE and USE statements to be commented out by adding "-- " before them, as such: Line 709

        $create_query = '-- CREATE DATABASE IF NOT EXISTS '

        Line 734

        '-- USE ' . PMA_Util::backquoteCompat($db, $compat)

          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
          • 26027
          • 145 Posts
          Quote from: sottwell at Jun 11, 2013, 10:53 AM
          From a stackoverflow response I found via Google - http://stackoverflow.com/questions/16892806/how-to-remove-create-database-if-not-exists-statement-from-export-in-phpmyadmi
          This behavior did not happen by default in version 3. A quick fix, actually a hack and thus not the desirable solution, is to edit the export class file located in libraries/plugins/export/ExportSql.class.php and force the CREATE and USE statements to be commented out by adding "-- " before them, as such: Line 709

          $create_query = '-- CREATE DATABASE IF NOT EXISTS '

          Line 734

          '-- USE ' . PMA_Util::backquoteCompat($db, $compat)

          Thanks Susan. That item is spot on. I thought that post was written by me. Anyway, just sent it over to our hosting company to see if they're up to installing a hack.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Google is your friend wink
              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
              • 26027
              • 145 Posts
              Quote from: sottwell at Jun 12, 2013, 12:12 AM
              Google is your friend wink
              Susan, I can't tell you how many times Google saved my bacon. If they began assessing me $5 a month for their service I'd likely pay it (albeit begrudgingly). Hope they're not reading this.

              Regards ... Sam