HOWTO: Create the StrongKey Database Schema




This step assumes that you have successfully installed the MySQL database. If not, please finish that before continuing with this step. It also assumes that you have downloaded the StrongKey distribution and extracted it into a directory called /usr/tmp. If you have extracted the distribution in a different directory, substitute that directory for /usr/tmp.

Windows users should use the backslash (\)instead of the forward slash (/) in these examples.

1

Change directory to /usr/tmp/symkey/sql/mysql:

cd /usr/tmp/symkey

2

Unzip the sql.zip file using the following:

unzip sql.zip

Windows users should use Windows Explorer to double-click the zip file. This will start the Unzip wizard. All files should be extracted to the c:\usr\tmp\symkey directory.

3

In the shell windows/Command Prompt, change directory to the /usr/tmp/symkey/sql/mysql directory.

cd /usr/tmp/symkey/sql/mysql

4

From this location, start the mysql client tool, supplying the symkey user name and password when you created the symkey database, as follows:

mysql -u symkey -p symkey

(Note: If the mysql client binary is not in your search path, add it to your environment, so that you can use mysql from any directory.)

5

Enter the password for the symkey user.

6

Create the schema by using the following:

mysql> source create.txt

7

Make sure the tables show up with lower-case table-names in your symkey database by using the following:

mysql> show tables;

8

If the tables show up with upper-case table-name, then your MySQL installation went awry. You will need to correct the configuration and recreate the MySQL instance and database by

setting the following parameter in the /etc/my.cnf file:

lower_case_table_names=1

Make sure it shows up under [mysqld] and [mysql.server].



Recreating the MySQL instance creates a new database. You will need to start from step 1 above, to ensure the symkey schema is created with lower-case table-names.

9

Exit from mysql using quit;

10

Log back into mysql using the xenc username and xenc password (if you used our TEST environment suggestion);

mysql -u xenc -p xenc

11

Create the xenc schema that will be used for database encryption testing by using the following:

mysql> source customers.sql;

12

Verify the table was created and its sample data was loaded by typing the following:

mysql> select * from customers;



You should see a few rows of mock customer data with made-up Social Security and Credit Card Numbers.

13

Exit from mysql using quit;

14

You have successfully created the symkey schema.