Home  >  Article  >  Database  >  Detailed example of init_connect method in mysql

Detailed example of init_connect method in mysql

Y2J
Y2JOriginal
2017-05-24 13:44:562015browse

The following editor will bring you a summary of several key points about mysql init_connect. The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let’s follow the editor and take a look.

The role of init_connect

init_connect is usually used to do some operations when a connection comes in, For example, set autocommit to 0, or record the current connected IP source and user information into a new table as login log information

Notes on using init_connect

1 Only the super account can set it (super_priv permission)

2 The super account ignores the init_connect setting (that is, the init_connect setting does not take effect on connections from the super account)

【Related recommendations】

1. Mysql free video tutorial

2. Detailed examples of adding new user permissions in MySQL

3. Detailed examples of changing passwords and access restrictions in MySQL

4. Details of examples of replacing content in the database with regular expressions Solution

5. Detailed explanation of examples of php storing images in mysql

The above is the detailed content of Detailed example of init_connect method in mysql. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn