{
    "mode": "perldoc",
    "parameter": "Apache::Session::Store::MySQL",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession%3A%3AStore%3A%3AMySQL/json",
    "generated": "2026-06-16T10:34:14Z",
    "synopsis": "use Apache::Session::Store::MySQL;\nmy $store = new Apache::Session::Store::MySQL;\n$store->insert($ref);\n$store->update($ref);\n$store->materialize($ref);\n$store->remove($ref);",
    "sections": {
        "NAME": {
            "content": "Apache::Session::Store::MySQL - Store persistent data in a MySQL\ndatabase\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Apache::Session::Store::MySQL;\n\nmy $store = new Apache::Session::Store::MySQL;\n\n$store->insert($ref);\n$store->update($ref);\n$store->materialize($ref);\n$store->remove($ref);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Apache::Session::Store::MySQL fulfills the storage interface of\nApache::Session. Session data is stored in a MySQL database.\n",
            "subsections": []
        },
        "SCHEMA": {
            "content": "To use this module, you will need at least these columns in a table\ncalled 'sessions', or another table name if you provide the TableName\nargument:\n\nid char(32)     # or however long your session IDs are.\nasession blob  # or varbinary if you plan to use a big session (>64k after serialization)\n\nTo create this schema, you can execute this command using the mysql\nprogram:\n\nCREATE TABLE sessions (\nid char(32) not null primary key,\nasession blob\n);\n\nIf you use some other command, ensure that there is a unique index on\nthe table's id column.\n",
            "subsections": []
        },
        "CONFIGURATION": {
            "content": "The module must know what datasource, username, and password to use when\nconnecting to the database. These values can be set using the options\nhash (see Apache::Session documentation). The options are:\n\nDataSource\nUserName\nPassword\nTableName\nHandle\n\nExample:\n\ntie %hash, 'Apache::Session::MySQL', $id, {\nDataSource => 'dbi:mysql:database',\nUserName   => 'databaseuser',\nPassword   => 'K00l',\nTableName  => 'sessions'\n};\n\nInstead, you may pass in an already-opened DBI handle to your database.\n\ntie %hash, 'Apache::Session::MySQL', $id, {\nHandle => $dbh\n};\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "This modules was written by Jeffrey William Baker <jwbaker@acm.org>\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Apache::Session\n",
            "subsections": []
        }
    },
    "summary": "Apache::Session::Store::MySQL - Store persistent data in a MySQL database",
    "flags": [],
    "examples": [],
    "see_also": []
}