{
    "content": [
        {
            "type": "text",
            "text": "# CGI::Session::Driver::mysql (perldoc)\n\n## NAME\n\nCGI::Session::Driver::mysql - CGI::Session driver for MySQL database\n\n## SYNOPSIS\n\n$s = CGI::Session->new( 'driver:mysql', $sid);\n$s = CGI::Session->new( 'driver:mysql', $sid, { DataSource  => 'dbi:mysql:test',\nUser        => 'sherzodr',\nPassword    => 'hello' });\n$s = CGI::Session->new( 'driver:mysql', $sid, { Handle => $dbh } );\n\n## DESCRIPTION\n\nmysql stores session records in a MySQL table. For details see CGI::Session::Driver::DBI, its\nparent class.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **LICENSING**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "CGI::Session::Driver::mysql",
        "section": "",
        "mode": "perldoc",
        "summary": "CGI::Session::Driver::mysql - CGI::Session driver for MySQL database",
        "synopsis": "$s = CGI::Session->new( 'driver:mysql', $sid);\n$s = CGI::Session->new( 'driver:mysql', $sid, { DataSource  => 'dbi:mysql:test',\nUser        => 'sherzodr',\nPassword    => 'hello' });\n$s = CGI::Session->new( 'driver:mysql', $sid, { Handle => $dbh } );",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 55,
                "subsections": []
            },
            {
                "name": "LICENSING",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "CGI::Session::Driver::mysql - CGI::Session driver for MySQL database\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "$s = CGI::Session->new( 'driver:mysql', $sid);\n$s = CGI::Session->new( 'driver:mysql', $sid, { DataSource  => 'dbi:mysql:test',\nUser        => 'sherzodr',\nPassword    => 'hello' });\n$s = CGI::Session->new( 'driver:mysql', $sid, { Handle => $dbh } );\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "mysql stores session records in a MySQL table. For details see CGI::Session::Driver::DBI, its\nparent class.\n\nIt's especially important for the MySQL driver that the session ID column be defined as a\nprimary key, or at least \"unique\", like this:\n\nCREATE TABLE sessions (\nid CHAR(32) NOT NULL PRIMARY KEY,\nasession TEXT NOT NULL\n);\n\nTo use different column names, change the 'create table' statement, and then simply do this:\n\n$s = CGI::Session->new('driver:mysql', undef,\n{\nTableName=>'session',\nIdColName=>'myid',\nDataColName=>'mydata',\nDataSource=>'dbi:mysql:project',\n});\n\nor\n\n$s = CGI::Session->new('driver:mysql', undef,\n{\nTableName=>'session',\nIdColName=>'myid',\nDataColName=>'mydata',\nHandle=>$dbh,\n});\n\nDRIVER ARGUMENTS\nmysql driver supports all the arguments documented in CGI::Session::Driver::DBI. In addition,\n*DataSource* argument can optionally leave leading \"dbi:mysql:\" string out:\n\n$s = CGI::Session->new( 'driver:mysql', $sid, {DataSource=>'shoppingcart'});\n# is the same as:\n$s = CGI::Session->new( 'driver:mysql', $sid, {DataSource=>'dbi:mysql:shoppingcart'});\n\nBACKWARDS COMPATIBILITY\nAs of V 4.30, the global variable $CGI::Session::MySQL::TABLENAME cannot be used to set the\nsession table's name.\n\nThis is due to changes in CGI::Session::Driver's new() method, which now allows the table's name\nto be changed (as well as allowing both the 'id' column name and the 'asession' column name to\nbe changed).\n\nSee the documentation for CGI::Session::Driver::DBI for details.\n\nIn particular, the new syntax for \"new()\" applies to all database drivers, whereas the old - and\nbad - global variable method only applied to MySQL.\n\nAlternately, call $session -> tablename('newname') just after creating the session object if\nyou wish to change the session table's name.\n",
                "subsections": []
            },
            "LICENSING": {
                "content": "For support and licensing see CGI::Session.\n",
                "subsections": []
            }
        }
    }
}