How to move a mythtv database from one machine to another

Backup the database on your source machine. Newer versions of mythtv do this for you automatically. Check out the mythconverg_backup.pl script if you have to do it manually.

Delete any existing database on your destination machine:

$ mysql -u root
mysql> DROP DATABASE IF EXISTS mythconverg;
mysql> quit

Re-create the empty database on your destination machine:

$ mysql -u root < mc.sql
(You may need to use the -p option and enter your root password)

You may also have to set up the mythtv user with the correct password:

$ mysql -u root < mc.sql UPDATE user SET Password=PASSWORD('YOURPASSWORDHERE') WHERE user='mythtv'; FLUSH PRIVILEGES;

After this, run the mythconverg_restore.pl script:

mythconverg_restore.pl --filename mythconverg-1214-20091010150513.sql.gz

You may have to specify hostname, database name and enter the password if you don’t have a mysql.txt file set up in my .mythtv directory. You may also have to specify the fully qualified path to the file if it’s not located in your default backup directory.

Leave a Reply

Your email address will not be published.