Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to check whether the mysql event is executed

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following is about how to check whether the mysql event is executed. If you are interested, let's take a look at this article. I believe it will be of some help to you after reading how to check whether the mysql event is executed.

How to operate the MySQL event?

Check to see if the event is enabled:

Select @ @ event_scheduler

Show variables like 'event_scheduler'

Show events;show full events;show create event event_name

Show processlist

There are several EVENT commands to view:

(1) query mysql.event table

(2) through the SHOW EVENTS command

(3) through the SHOW FULL EVENTS command

(4) by querying information_schema.events table

(5) SHOW CREATE EVENT.

In summary, event is used less frequently and it is recommended that you use root users for creation and maintenance.

Query information_schema.events table

Select * from information_schema.events limit 1\ g

Events that enable mysql:

The parameter set global event_scheduler = on; takes effect immediately

Change the configuration file and restart event_scheduler=on

Add it in the [mysqld] section of my.cnf, and then restart mysql.

Start by setting event parameters

Mysqld...-- event_scheduler=on

Use suggestion

1) the master library has been executed, and the slave library ensures that the event will not be executed (unless the event is deliberately created on the slave)

2) creation, deletion and other operations are strictly prohibited from directly manipulating mysql.event tables, but are implemented through formal syntax such as create

3) if the created event involves massive data changes, it should be fully tested to ensure that the existing network service is not affected.

4) if you need to back up DB,mysqldump with event, you need to add-- event parameter.

Read the above about how to see if the mysql event is executed in detail and if you have learned anything. If you want to know more about it, you can continue to follow our industry information section.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report