Perl Script for converting from SQLite to MySQL

Notice: This plugin is deprecated in favor of TracMigratePlugin.


This script will fix schema, and indexes to work correctly. It is specifically designed for an instance of Trac that has been installed for a while (with lots of extra tables from plugins) and convert things over. Using 'dump' doesnt' work in this case because of the mixture of quotes. It's fairly easy to run and works across multiple machines.

This script was written in self defense as the conversion process is particularly painful.

See also: TracMigratePlugin


  • you will need to have the DBI, DBD::mysql and DBD::SQLite Perl modules installed: search CPAN for the latest versions.
  • you will need to have sqlite3 in your path.
  • you need to have full permissions on the target database server.

Bugs/Feature Requests

Existing bugs and feature requests for PerlSqliteToMysqlScript are here.

If you have any issues, create a new ticket.


Download the zipped source from here.


You can check out PerlSqliteToMysqlScript from here using Subversion, or browse the source with Trac.


sandinak@hishost>                       {options} [path-to-trac-instance]
        -v              verbose
        -db {name}      name of the MySQL database
        -dh {hostname}  hostname of the database server
        -du {user}      username for this database
        -dp {pass}      password for this database

Recent Changes

9994 by sandinak on 2011-03-28 22:15:30
Fixed non-localhost based updates.
9993 by sandinak on 2011-03-28 20:46:54
fixing STDERR redirect problem
9992 by sandinak on 2011-03-28 20:30:49
initial checkin


Author: sandinak
Maintainer: branson

Last modified 9 months ago Last modified on Nov 19, 2015, 3:34:13 PM