When you have installed the MySQL Server or if you already had a MySQL Server running, it is now time to prepare the database for CardExchange® Visitor. The creation of the database is very basic as we only have create the database and 1 (one) table, the Migrations table. As soon as this table is available and you start CardExchange® Visitor for the first time, it will then create the complete database needed for the application.
Below is the complete script but we have included step-by-step instructions below as well:
CREATE DATABASE `cegateway`;
USE `cegateway`;
CREATE TABLE `tblsystem_migrations` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Version` int(11) NOT NULL,
`MigrationDate` datetime NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
To setup a database with MySQL, we will have to do some specific command line commands via the MySQL Command Line Client. To start the client, browse your start menu and look for the MySQL folder and select MySQL 5.7 Command Line Client.
The first thing we need to enter when the command line client starts is ROOT password so enter the password and hit Enter.
After the password is entered and accepted successfully, the client is ready for commands.
First we have to create the database so enter the exact command below (copy and paste is adviced) and hit Enter:
CREATE DATABASE `cegateway`;
When successful, the query should indicate OK, 1 row should be affected.
Now we need to tell the system to use the created database for creating the table later. Enter or copy and paste the command below and hit Enter:
USE `cegateway`;
When successful, it will indicate that the Database has changed. Now we can create the migration table.
To create the migrations table, please enter (copy and paste advised) the command below and hit Enter:
CREATE TABLE `tblsystem_migrations` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Version` int(11) NOT NULL,
`MigrationDate` datetime NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
When successful, the query will indicate OK and 0 (zero) rows are affected.
You have now successfully created the database and the migration table. When you run CardExchange® Visitor for the first time, it will create the table structure to be used, also when performing updates we may change the structure within a future release. If this is done then a migration table keep track of any changes in future releases of the database and will be fully self maintaining.
The only think left to do is the configuration of the client(s). To do so, please refer to the specific section of this help file for the configuration of the Client or the KIOSK.