set the variable MySQL @abc_g_ses_id in your web application. code example Example: how to create a variable in mysql -- MySQL SET @variable_name := value;