NAME

Web::Session::MySQL - Alias of Web::Session::MySQLJSON

SYNOPSIS

use Web::Session::MySQL;

my $args = {
     DataSource => 'dbi:mysql:sessions',
     UserName   => $db_user,
     Password   => $db_pass,
     Commit     => 1,
};

tie %session, 'Web::Session::MySQL', $id, $args;

DESCRIPTION

This module is an alias of Web::Session::MySQLJSON: sessions are stored as JSON in a json column, and indexes are built on generated columns. See Web::Session::MySQLJSON for the table, the indexes and the available options (and Web::Session::MariaDBJSON for MariaDB).

Previous versions stored each indexed field in its own column. A table created for them is not compatible: create a new table as described in Web::Session::MySQLJSON, then copy the sessions, for example:

INSERT INTO new_sessions (id, a_session)
  SELECT id, a_session FROM sessions WHERE JSON_VALID(a_session);

SEE ALSO

Web::Session::MySQLJSON, Web::Session

COPYRIGHT AND LICENSE

2009-2026 by Xavier Guimard
2013-2025 by Clément Oudot
2019-2025 by Maxime Besson
2013-2025 by Worteks
2023-2026 by Linagora

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.