Server Settings Scope

 < Day Day Up > 

Broadly speaking, MySQL's server variables fall into one of three camps:

  • GLOBAL variables These are settings that are in effect for the entire MySQL instance. They are typically specified as an input parameter to the mysqld process, or contained in the MySQL configuration file. A good example of a GLOBAL variable is the connect_timeout setting, which sets the serverwide policy on how long MySQL will wait to complete a connection from any client.

    Although GLOBAL variables affect the entire server, there are situations in which they might be overridden by a client.

  • SESSION variables These apply only in the context of a specific MySQL connection, and are usually thought of as very specific to a particular application or processing need. For example, the autocommit variable controls the behavior of transactional operations for a specific connection.

  • GLOBAL and SESSION variables Many GLOBAL variables can be modified to fit the particular processing needs of a session. For example, the bulk_insert_buffer_size variable allocates a particular amount of memory for large-scale data insertion operations. You can elect to have one value for the entire server, and then allow a connection to specify its own setting.

     < Day Day Up > 


    MySQL Database Design and Tuning
    MySQL Database Design and Tuning
    ISBN: 0672327651
    EAN: 2147483647
    Year: 2005
    Pages: 131

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net