ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Setting MySQL variable via EE ??

March 12, 2010 4:10am

Subscribe [1]
  • #1 / Mar 12, 2010 4:10am

    Octopus XL

    9 posts

    Hi my client runs on Windows server with MySQL on strict mode. When asked for a non-strict MySQL, I am thrown with this “Setting the SESSION variable affects only the current client. Any client can change its own session sql_mode value at any time.”

    So does this mean I can change the sql_mode via EE? If so, how does it work?
    Or is this a purely MySQL setting?

    I’m have no idea how MySQL works, here’s the whole quote from the web host if it helps. :

    5.1.8. Server SQL Modes

    The MySQL server can operate in different SQL modes, and can apply these modes differently for different clients. This capability enables each application to tailor the server’s operating mode to its own requirements.

    For answers to some questions that are often asked about server SQL modes in MySQL, see Section A.3, “MySQL 5.1 FAQ — Server SQL Mode”.

    Modes define what SQL syntax MySQL should support and what kind of data validation checks it should perform. This makes it easier to use MySQL in different environments and to use MySQL together with other database servers.

    You can set the default SQL mode by starting mysqld with the—sql-mode=“modes” option, or by using sql-mode=“modes” in my.cnf (Unix operating systems) or my.ini (Windows). modes is a list of different modes separated by comma (“,”) characters. The default value is empty (no modes set). The modes value also can be empty (—sql-mode=”” on the command line, or sql-mode=”” in my.cnf on Unix systems or in my.ini on Windows) if you want to clear it explicitly.

    You can change the SQL mode at runtime by using a SET [GLOBAL|SESSION] sql_mode=‘modes’ statement to set the sql_mode system value. Setting the GLOBAL variable requires the SUPER privilege and affects the operation of all clients that connect from that time on. Setting the SESSION variable affects only the current client. Any client can change its own session sql_mode value at any time.

  • #2 / Mar 12, 2010 8:03am

    Lisa Wess

    20502 posts

    Hi, Xiao -

    ExpressionEngine 1.6.x requires that the database not be run in Strict Module:

    http://expressionengine.com/overview/requirements/

    EE 2.0 PB can run in strict mode; so if this is an absolute requirement for you then you might try out the beta.

  • #3 / Mar 14, 2010 4:29am

    Octopus XL

    9 posts

    Thanks again Lisa, was trying my luck as it seems like it is viable. I shall hound my client.

  • #4 / Mar 15, 2010 3:06am

    John Henry Donovan

    12339 posts

    Xiao,

    As you have something to go back to your client with I am closing this thread for now. If you need further questions answered regarding EE 2.0 PB then feel free to start a new thread in our Pre-Sales forum

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases