Microsoft Access

From MythTV Official Wiki
Revision as of 15:21, 23 July 2007 by Davidsegall (talk | contribs) (Using Microsoft Access to access mythconverg)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


MythTV occasionally requires changes to the database that are difficult, or even impossible, using the standard MythTV or MythWeb interface. Microsoft Access provides a convenient front end to the database that enables changes to be made using a spreadsheet style view of the contents. It can be used to produce neatly formatted reports of your music collection or even to examine and change the structure of the MythTV database. Microsoft Access provides a powerful tool for use with any database that has an ODBC driver. Its main rival is OpenOffice Base that provides most of the capabilities of Access for databases with a JDBC driver and has the advantage that it is cross-platform and open source.

Obtain the MySQL ODBC driver

Go to the MySQL connector page and click the Connector/ODBC link then choose a Windows installer or setup link. This will install the ODBC driver and configure the Windows ODBC datasource administrator.

Set up the data source

From the Start Menu choose Control Panel->Administrative Tools->Data Sources (ODBC)
Click the System DSN tab, press the Add button and select the MySQL ODBC driver. This brings up the configure window and an example is shown below.

odbc.gif

The default database password is mythtv. You will need to change the Server to the name or IP address of your MythTV backend. Press the Test button and, hopefully, you will see the message "Success; connection was made!". If not press the Diagnostics button to provide some assistance.

Open mythconverg in Access

Open and name new database in Access then select File->Get External Data->Link Tables from the menu. Choose ODBC Databases from the file type drop down in the Open File (Link) dialogue. Select the Machine Data Source tab in the Select Data Source dialogue and choose the data source you set up in the preceding paragraph. Now press "Select All" in the Link Tables dialogue. Check, or leave blank the Save Password box depending on your security concerns. You will be asked to supply a unique key field for some tables. I chose the first field.

Be careful and backup your database

You now have a simple way of altering your database. Use it sparingly; a careless change may mean that you have to reconstruct the entire database. You can minimise the pain by making regular backups see Periodic Maintenance