en
Language
  • en
  • cs
  • hu
  • de
  • fr
  • es
  • br
  • ru
  • kr
  • jp
AI translation
  • it
  • pl
  • tr

How to Convert SQLite into MySQL

Introduction

This guide explains how to convert a SQLite database into MySQL. This process is useful if you're migrating data from a Redmine instance using SQLite into an Easy8 environment using MySQL.

Target Audience

  • Administrator

Prerequisites

Before you begin, make sure the following requirements are met:

  • Easy8 is installed in a Linux environment
  • Python is installed (tested with version 2.7.12)
  • SQLite3 is installed (version 3.11.0 or similar)
  • MySQL is installed
  • You have access to both the original Redmine server and the new Easy8 server
  • You have sudo or root privileges

How to Convert SQLite to MySQL

Step 1: Dump the SQLite Database

On your current Redmine server:

  1. Create a dump of the SQLite database file:
    sqlite3 db/redmine.sqlite3 .dump > redmine_dump.sqlite3
  2. Transfer the dump file (redmine_dump.sqlite3) to the server where Easy8 is installed.

Step 2: Create a New MySQL Database

  1. Log in to MySQL:
    mysql -u root -p
  2. Create a new database for the converted data:
    create database sqlite3_convert char set utf8mb4 row_format = dynamic;
    exit;

Step 3: Download the Conversion Script

  1. Download the conversion tool sqlite3-to-mysql.py to your Easy8 server.
  2. Place it in a directory where you can easily access it.

Step 4: Run the Conversion

  1. Run the following command as root or using sudo:
    sqlite3 redmine_dump.sqlite3 .dump | python sqlite3-to-mysql.py | mysql -u root -p sqlite3_convert
  2. When prompted, enter your MySQL root password.

This process may take around 10 minutes, depending on the size of the database.

Conclusion

You have successfully converted your SQLite database to MySQL and imported it into a new database for use with Easy8. This migration step is useful when moving from a lightweight Redmine setup to a more robust Easy8 environment.

Related Topics and Further Reading

  • Easy8 Documentation
  • SQLite to MySQL conversion tools
  • MySQL character set and storage engine configurations

Try Easy8 in 30 days free trial

Access all features, SSL protected, no credit card required.