MySQL: Importing data from On Demand or trial - FogBugz Knowledge Exchange most recent 30 from http://fogbugz.stackexchange.com 2012-02-09T08:36:39Z http://fogbugz.stackexchange.com/feeds/question/228 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://fogbugz.stackexchange.com/questions/228/mysql-importing-data-from-on-demand-or-trial MySQL: Importing data from On Demand or trial FogBugz KB 2009-10-13T21:10:11Z 2011-09-30T15:19:47Z <p>How can I import a FogBugz On Demand trial database into MySQL?</p> http://fogbugz.stackexchange.com/questions/228/mysql-importing-data-from-on-demand-or-trial/229#229 Answer by FogBugz KB for MySQL: Importing data from On Demand or trial FogBugz KB 2009-10-13T21:11:35Z 2011-04-08T15:35:10Z <p><strong>NB</strong>: Before you go through any of this, <strong>you should make sure there are <a href="http://fogbugz.stackexchange.com/questions/1102/what-gotchas-are-there-in-the-mysql-requirements-for-fogbugz" rel="nofollow">no FogBugz-unfriendly settings</a> in your MySQL instance.</strong></p> <p><strong>1.</strong> Log into your hosted account as a Site Administrator. Click Settings at the top right, then "My On Demand Account", and click the download link for "MySQL format". Download and save the .sql file to your computer.</p> <p><strong>2.</strong> Install FogBugz fully and get it working (even add a test case). &nbsp;Remember the FogBugz user and password that you set for the database. <b>Before you go on, stop the FogBugz Maintenance Service</b>.</p> <p><strong>3.</strong> Once its working, log into mysql. You should be able to log on using the <em>fogbugz </em>user and password at this point.&nbsp; The instructions assume your FogBugz database is called 'fogbugz'.&nbsp; If not, replace <em>fogbugz</em> with the name of your database.<br /> <br /> mysql&gt; drop database <em>fogbugz</em>;<br /> mysql&gt; create database <em>fogbugz</em>;<br /> mysql&gt; use <em>fogbugz</em>;<br /> mysql&gt; source <em>/path/to/trial.sql.dat</em><br /> mysql&gt; grant all on <em>fogbugz</em>.* to <em>fogbugzuser</em> identified by <em>'fogbugzpassword'</em>;<br /> mysql&gt; grant all on <em>fogbugz</em>.* to <em>fogbugzuser@'localhost'</em> identified by <em>'fogbugzpassword'</em>;</p> <p>Note the ' around the 'localhost' part.&nbsp; You can replace localhost with the server name if your FogBugz server is on a different machine.&nbsp; You should replace all italicized values above with values corresponding to your setup and environment.</p> <p>Note the use of the "source" command above. Do not simply paste the contents of the .sql file into a MySQL GUI and run it. Tests have shown that this results in corrupted cases under certain circumstances.<br /> <br /> <strong>4.</strong> Then go back into FogBugz through your web browser. You will have to enter your order info for licenses again.</p> http://fogbugz.stackexchange.com/questions/228/mysql-importing-data-from-on-demand-or-trial/681#681 Answer by Rich Armstrong for MySQL: Importing data from On Demand or trial Rich Armstrong 2009-11-12T03:40:04Z 2009-11-12T03:40:04Z <p>If you get errors during the "source" command, your instance of MySQL might be running in SQL strict mode. This needs to be disabled for FogBugz databases to operate correctly. (Strict mode is useful for when you want the database to offer all kinds of constraints; we put these constraints in our code, not the database schema.)</p> <p>To disable strict mode, log into MySQL and run:</p> <pre><code>SELECT @@global.sql_mode; </code></pre> <p>If you get anything other than a blank string back, run:</p> <pre><code>SET @@global.sql_mode = ''; </code></pre> <p>Note: This setting might be set in your MySQL configuration files, so if you restart MySQL, strict mode might be re-enabled, which will interfere with the normal operation of FogBugz. Check your my.cnf or my.ini file for lines that set the sql_mode setting.</p> http://fogbugz.stackexchange.com/questions/228/mysql-importing-data-from-on-demand-or-trial/1123#1123 Answer by adambox for MySQL: Importing data from On Demand or trial adambox 2009-12-17T19:57:06Z 2009-12-17T19:57:06Z <p>If your plugins are broken after import, re-install them per <a href="http://fogbugz.stackexchange.com/questions/1121/my-plugins-are-broken-after-importing-my-on-demand-database-locally" rel="nofollow">this question</a>.</p>