title: Using previous MySQL data folder on new MySQL installation
body: <p>If I could have made a proper <code>SQL dump/backup</code> I would have, but <code>OS</code> gave out and could only log into <code>SafeMode</code>, where I couldn't start the <code>MySQL server</code>. Therefore, I could only manually backup the file directories.</p>
  
  <ul>
  <li>I have a saved file copy of C:\ProgramData\MySQL\MySQL Server 8.0</li>
  <li>I have a saved file copy of C:\Program Files\MySQL\MySQL Server 8.0</li>
  </ul>
  
  <p>I'm now running on a new installation of <code>Windows</code> and trying to start this old server up for a few minutes so I can log on from <code>Workbench</code> and make a proper <code>SQL database dump</code> which will I <code>import</code> on a new <code>MySQL</code> installation later.</p>
  
  <p>Consequently, moving the mentioned files in their respective locations - <code>Program Files</code> and <code>ProgramData</code>.</p>
  
  <p>Opening up <code>PowerShell</code> (with Admin rights) and doing:</p>
  
  <pre><code>mysqld --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0" --console
  </code></pre>
  
  <p>and I get a few <strong>hundred</strong> lines on the screen that contain the following:</p>
  
  <pre><code>2020-04-10T05:28:56.725818Z 0 [ERROR] [MY-011972] [InnoDB] Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html for information about forcing recovery.
  2020-04-10T05:28:56.734460Z 0 [ERROR] [MY-011971] [InnoDB] Tablespace 'innodb_undo_001' Page [page id: space=4294967279, page number=5] log sequence number 1339677380 is in the future! Current system log sequence number 19081380.
  </code></pre>
  
  <p>Followed by:</p>
  
  <pre><code>2020-04-10T05:28:56.740834Z 0 [ERROR] [MY-011972] [InnoDB] Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html for information about forcing recovery.
  2020-04-10T05:28:56.757259Z 0 [System] [MY-010229] [Server] Starting crash recovery...
  2020-04-10T05:28:56.769215Z 0 [System] [MY-010232] [Server] Crash recovery finished.
  2020-04-10T05:28:57.695386Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
  2020-04-10T05:28:57.765911Z 0 [System] [MY-010931] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: ready for connections. Version: '8.0.13'  socket: ''  port: 3306  MySQL Community Server - GPL.
  2020-04-10T05:28:57.926850Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060
  </code></pre>
  
  <p>Great, at least its running. </p>
  
  <p>I can now <code>connect</code> but no <code>databases</code>.</p>
  
  <ul>
  <li>What can I do / how should I proceed to successfully get those databases back temporarily?</li>
  </ul>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Removed the innodb_undo_001 and innodb_undo_002 files from the Data directory and relaunched.</p>
  
  <p>Getting this:</p>
  
  <pre><code>PS C:\Program Files\MySQL\MySQL Server 8.0\bin&gt; .\mysqld --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --console                                                               2020-04-10T05:55:29.555478Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
  2020-04-10T05:55:29.558313Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.13) starting as process 3028
  2020-04-10T05:55:31.394427Z 1 [Warning] [MY-012351] [InnoDB] Tablespace 1, name 'sys/sys_config', file '.\sys\sys_config.ibd' is missing!
  2020-04-10T05:55:32.808645Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
  2020-04-10T05:55:32.856154Z 0 [System] [MY-010931] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: ready for connections. Version: '8.0.13'  socket: ''  port: 3306  MySQL Community Server - GPL.
  2020-04-10T05:55:32.898055Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060
  </code></pre>
  
  <p><strong><em>Running but no databases present.</em></strong></p>
  
  <p>Tried the Innodb-force-recovery approach - nothing happens. Same as before.</p>