« Time Clock MTS Version 3.0.3 Released | Main | Time Clock MTS Version 3.0.4 Released »

November 4, 2010

Using Time Clock MTS with MySQL

By Mark Nemtsas at 12:45 PM

By default, Time Clock MTS uses a Microsoft Access database as a backend database to store its' data. If you purchase the Enhanced Database Support option when you buy Time Clock MTS you can have it use a more robust database management system such as Microsoft SQL Server or the open source (and free) MySQL. This blog entry takes you through the process of setting up Time Clock MTS with MySQL, which claims to be the worlds most popular open source database system.

Step 1 - Install and Configure MySQL
Install and configure MySQL and create a database for Time Clock MTS to use. This is beyond the scope of this article, all you should need is available from the MySQL Website.

Step 2 - Create the Time Clock MTS MySQL Table Structure
If you're a trial user of Time Clock MTS or a licensed user who purchased the Enhanced Database Support option then you can use Time Clock MTS to create a MySQL script to create the Time Clock MTS table structure. Here's how to do that:


The Generate MySQL Script Menu


  • Log into Time Clock MTS administrator software as the administrator and go to the Tools->Generate MySQL Script menu (seen in the image above). If you can't see this menu then you are not in the Time Clock MTS trial period or you did not purchase the Enhanced Database Support Options.


  • The Time Clock MTS MySQL Database Script

  • When you run the Generate MySQL Script menu item Time Clock MTS will create a MySQL script that can be used to create the required Time Clock MTS table structure in MySQL. You can see this script in the image above.

  • Once you've got the script you can then run it against your MySQL database in the tool of your choice. Here we use the MySQL Workbench but you could run this script using the MySQL command line or whatever your MySQL administrative tool of choice happens to be.

Step 3 - Preparing Computers to Connect to the MySQL Database

On most Microsoft Windows computers it is necessary to install some drivers to allow them to connect to and communicate with a MySQL Database. Here's what you'll need to do.




The Time Clock MTS System Options screen

Step 4 - Connecting Time Clock MTS to the MySQL Database

The next step is to connect Time Clock MTS to your MySQL database. Initially this is done from the Time Clock MTS administrator program which you should have downloaded and installed already. Once you've done that follow the steps below.



  • Log into Time Clock MTS as the administrator and go to the Tools->Options->System Options screen (shown above). If your screen doesn't look like this then you're logged into the Time Clock MTS client and you need to install the administrator software.

  • Enter the name of your MySQL Server, the name of the MySQL database, and the name of a MySQL user and their password. Note that the MySQL user Time Clock MTS uses must have permissions to add, edit, and delete both data and database tables.


  • Testing the Connection

  • Now you need to test that Time Clock MTS can connect to the MySQL database correctly and that the structure is correct. To do this click the Test MySQL Connection button. If the settings you entered are correct and you've set up your MySQL server correctly then you'll be shown a Connection OK message (shown above).


  • Connecting to the Database

  • Once you're sure Time Clock MTS can connect to MySQL without problems it's time to select MySQL from the Database Type dropdown and click Save. Then you should get a message telling you that Time Clock MTS has connected to your database server (see above).


  • Verify Connection

  • Now you need to shut down Time Clock MTS and re-start it. Once you've done that you can verify that you're connected to the MySQL database by going to the Help->About screen and look at the bottom of the screen, you'll see that you're now connected to the correct database (see above).

  • The final step in the process is to install your Time Clock MTS clients and connect them to your MySQL Database. You'll do that with the Database Connection Wizard when you first install and run the Time Clock MTS Client


That concludes the process of connecting Time Clock MTS to a MySQL database back end. At this time it's worth noting a few things.


Notes

  1. No data is transferred from the Access backend to the new MySQL backend. None at all. So when you first move to a MySQL backend you're starting from scratch.

  2. If when you go to the System Options screen the database server fields and so on are obscured by a text box informing you that you are not licensed to use MySQL (or SQL Server for that matter) as a backend for Time Clock MTS then it's because....well... you're not licensed to use them. You'll need to Contact Us to talk about upgrade options.

  3. If you receive a hard crash or access violation when you first run Time Clock MTS after you've connected to MySQL then you should download and install the latest version of MDAC for your particular flavor of Microsoft Windows. This can be downloaded from the Microsoft MDAC Downloads page.


Get the Free Trial Download 30 Day Free Trial Buy Now! From just $79 (US) for a single computer
And $114 (US) for two computers

Posted by mnemtsas at November 4, 2010 12:45 PM

Comments

Post a comment




Remember Me?