Creating the ColdFusion Client Variable Storage Database and Tables within MySQL

ColdFusion does not create the proper tables for client variable storage when using MySQL as the database engine.  This is valid in ColdFusion 9 and also still present in ColdFusion 10.  These tables should be created manually for client variable storage to function.

Two tables are required. CDATA and CGLOBAL. Details about theses tables are as follows:

The CDATA table must have the following columns:

Column | Data type

cfid | CHAR(64), TEXT, VARCHAR, or any data type capable of taking variable length strings up to 64 characters

app | CHAR(64), TEXT, VARCHAR, or any data type capable of taking variable length strings up to 64 characters

data | MEMO, LONGTEXT, LONG VARCHAR, CLOB, or any data type capable of taking long, indeterminate-length strings

 

The CGLOBAL table must have the following columns:

Column | Data type

cfid | CHAR(64), TEXT, VARCHAR, or any data type capable of taking variable length strings up to 64 characters

data | MEMO, LONGTEXT, LONG VARCHAR, CLOB, or any data type capable of taking long, indeterminate-length strings

lvisit | TIMESTAMP, DATETIME, DATE, or any data type that stores date and time values

 

If the database has not yet been created, you can create the database and tables with this:

To create the tables, the following queries can be used (this is if you have already created the database and have an appropriately privileged user that is able to access the database):


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *