• No results found

HOW TO CONNECT TO CAC DATABASE SERVER USING MySQL

N/A
N/A
Protected

Academic year: 2021

Share "HOW TO CONNECT TO CAC DATABASE SERVER USING MySQL"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

HOW TO CONNECT TO CAC DATABASE SERVER USING MySQL

22 mai 2013

In some projects, it is quite interesting to access to the CAC database for 3rd party apps integration purposes or just to check out the information stored in the database.

INTRODUCTION

In some projects, it is quite interesting to access to the CAC database for 3rd party apps integration purposes or just to check out the information stored in the database.

In this application note we are going to introduce some tools which may be useful to achieve this: CAC DB_Manager

HeidiSQL (Any other SQL-Client would be also valid)

TECHNICAL TERMS

Database:

A database is an organized collection of data. In our case, the database is the group of data tables which include information about all Users, Doors, Profiles, etc. and all their corresponding univoque features such as door-number or User-ID.

In CAC, the database is stored in a file called “bdmds”

Database Management System: (DBMS)

A Database Management Systems (DBMS) is a set of programs that enables storing, modifying, and extracting information from a database. It also provides users with tools to add, delete, access, modify, and analyze data stored in one location. It is frequently called “Database Engine”.

Well known DBMSs include Oracle, FoxPro, Microsoft Access, Microsoft SQL Server, Paradox,MySQL, SQLite, etc. A database is not generally portable across different DBMS, but different DBMSs can inter-operate to some degree by using standards like SQL to support a single application built over more than one database.

In CAC, the Database Engine used is MySQL

CAC DB_MANAGER

CAC DB_Manager is just a software which will be useful to generate the corresponging permissions to access to the CAC Database. The software is available on the following link (Direct Download):

http://docweb.fermax.com/docs/techchannel/TEX_CAC_DBManager.zip

Requirements:

CAC Database Server 1.6 (or higher) installed and running. No others MySQL instances running at the same time. Java JRE version 1.6 (or higher).

No installation required. Contents:

HOW TO USE

1.- Unzip the file to a known folder.

2.- Double click in

(2)

4.- If the software has been launched properly, the following form will be shown:

5.- Enter a valid user: from 3 to 15 alphabetic characters and click on “Create New User” and “Yes”

6.- A User-key (password) will be generated. Write it down and avoid that 3rd persons may note this key.

7.- The software will ask about creating another user. Select “Yes” to continue or “No” to exit.

NOTE: This password is different and univoque for each user. It is generated using an algorithm that includes the username and some features of the own PC. Therefore, this key will be different if we execute the software in different computers. NOTE: In case we create another user with the same name, this will overwrite the previous one.

(3)

At this point, we have created a new user to manage the CAC database. In our case: Username = “newuser” (Selected by the user)

Password = “UfSwvHcD” (Generated by the software)

This user will have the following persimissions to manage the CAC Database using a MySQL Client:

List registers and tables Insert new registers

Modify existing registers manually Erase registers

This user will not be able to erase tables in order to respect the structure of the database, not getting the bdmds file corrupted by mistake.

Once a valid user has been created, we can connect to the database manually using a MySQL Client. In this article we will use HeidiSQL (Open Source) but you can use any other one

How to connect to the database:

First of all, we need to install a MySQL Client. On the following link, there is available a free one (HeidiSQL) http://www.heidisql.com/download.php

Once we have launched the SQL Client, we will open a communication with the MySQL Server. It is important that the server is running, so do not forget to execute CAC Database Server

(4)

Selecting a specific table in the “bdmds” list, there is a TAB in which we can see the information stored:

How to create a back-up manually:

Using a SQL Client, we can save a back-up of our installation.

In general, a backup file in CAC is just a list of SQL sentences executed in MySQL server which: Creates the CAC tables (CREATE/ALTER TABLE sql commands)

Adds the information we had stored (INSERT INTO sql commands)

(5)

2.- Select a folder and name to save the Back-up. Set the options as per indicated in the following example:

3.- The file created will be saved as .sql file. We cannot import this file into CAC Server but we can use HeidiSQL afterwards to import this file (which contains SQL sentences with the information of the whole installation), overwritting the existing database.

To import this back-up to the database, just doble-click on this file and select the MySQL connection as we did above:

Finally, in HeidiSQL you can execute this sql file. The sentences will be executed overwriting the existing databae and creating a new one with the information we had saved on this back-up.

(6)

CONCLUSIONS:

With CAC DB Manager Software we will be able to create a user in order to manage the CAC Database. This can be useful to debug any possible database fail as well as to integrate our CAC system with an existing database (3rd party apps integration). When we save a backup file in CAC, we are saving just a script of SQL sentences .These sentences are executed over the CAC database when we load this backup file.

With a MySQL Client

We can check the information stored on each table.

We can modify parameters and registers in the database manually.

We can save the database as a .sql file, which is similar to a .cac file (backup).

We can execute a .cac or a .sql file to restore a database manually in our CAC Softwares.

You can download the full application note on the following link:

http://docweb.fermax.com/docs/techchannel/TEX_APNOTE_MySQL_CAC.zip For any further assistance, do not hesitate to contact FERMAX Technical department.

References

Related documents

• §105(d)(9): Examine the financial reports of health insurers and evaluate the impact of the Healthy Michigan Plan on the cost of uncompensated care as it relates to insurance

That in accordance with Report CORP-14-69 dated May 1, 2014, video recording and photography during Council and Committee meetings be permitted from a designated area in

The results in Sections 2.1 and 2.2 suggest that market fragmentation by dark venues affect the mix of informed and uninformed order flow and discourages liquidity providers

FDM’s service provision is purely resource-based and the expectation is that the consumer will facilitate all technical requirements in order for the Consultants to perform

Exporting plants in differentiated sectors exhibit quality-based competence in the home market, whereas those in non-differentiated sectors do not, so the very different behavior.

Beim Vergleich mit den Ergebnissen der Indirekten Methode wird jedoch deutlich, dass auf diese Weise erzielte Ergebnisse einer systematischen Abweichung unterworfen sind,

The primary aim of this study was to correlate strain ratio with pT stage and to assess the ability of endorec- tal strain elastography to improve the staging of early- stage

The extract of the cultured apple stem cells was shown to en- hance the viability of umbilical cord blood stem cells, to reverse senescence signs in human fibrob- last cells and