» tagged pages
» logout

sorted by: recent | see : popular
Content Tagged with editing + Editor

Avidemux - Main Page

An open source multi-platform video editor

opensource: del.icio.us tag/opensource

SilverIPE - A tiny In Place Editor Class

SilverIPE is a cross-browser in place editor JavaScript class. It is easy to use and the script itself is rather tiny (about 4kb compressed). It is well documented and easy to use.

mootools: del.icio.us/tag/mootools

Using Scheduled Events in MySQL? 5.1

[HoneyMonitor is a MySQL? GUI Tool for Windows? Systems. Server Administration, Database and Database Objects Administration, Code Development, Server Monitoring, Performance Monitoring, Performance Auditing. Read more on http://www.honeysoftware.com]

This is a short tutorial on the features implemented in HoneyMonitor for the use and administration of Scheduled Events . It could be useful for Users who are new to the product and want to get start with it or to whom want to learn the basis of Scheduled Events in MySQL? 5.1

More details on the HoneyMonitor Reference Manual at http://www.honeysoftware.com/honeymonitor/doc.

 

Contents

  • Introduction
  • The Scheduled Event Editor
    1. Performed Action
    2. Advanced
    3. Comment
    4. SQL
  • Other way to create Events in HoneyMonitor
  • Editing Events
  • Information about the Execution of the Events
  • Do you want to know / edit the value of the variable event_scheduler?
  • Event Metadata
  • Other Resources
  • About the Author

1. Introduction

Scheduled Events have been added in MySQL? v.5.1.6.

An Event is a named database object containing one or more SQL statements to be executed at one or more regular intervals, beginning and ending at a specific date and time. Scheduled tasks of this type are also sometimes known as ?temporal triggers?, implying that these are objects that are triggered by the passage of time.

An Event can be enabled or disabled (there is also a third state: disabled on slave); if disabled the event is still present in the database but it is not executed.

For more information about Events, please visit http://dev.mysql.com/doc/refman/5.1/en/events.html

In HoneyMonitor, Events of a specific database are listed in the Server Objects List (Fig. 1)

Server Objects List - Events

Fig. 1: Server Objects List - Events

For more information about the Server Objects List, please refer to this post.

 

2. The Scheduled Event Editor

HoneyMonitor includes a Scheduled Event Editor (Fig. 2) that allow you to create, alter, rename and drop your Events.

The Scheduled Event Editor

Fig. 2: The Scheduled Event Editor

Let’s see how to use it.

No special privileges are required to use this Editor as HoneyMonitor retrieves the data it need from the information_schema database (it is not necessary that users have privileges on the mysql database). By the way, note that there is a privilege that govern the creation, modification, and deletion of events, the EVENT privilege.

I used some queries similar to the following to create a database and a user to test the Scheduled Event Editor:

CREATE DATABASE `sleto`;
CREATE USER ’sleto’@'localhost’;
FLUSH PRIVILEGES;
GRANT USAGE ON *.* TO ’sleto’@'localhost’ REQUIRE NONE;
FLUSH PRIVILEGES;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EXECUTE,EVENT,TRIGGER ON `sleto`.* TO ’sleto’@'localhost’;
FLUSH PRIVILEGES;

Events are executed by a special event scheduler thread; the global event_scheduler system variable determines whether the Event Scheduler is enabled and running on the server. If you don’t know the value of this variable ? or if you don’t know that such a variable exists ? don’t worry: look at the status-bar of the Editor, and click on it to enable the Event Scheduler (Fig. 3).

 Event Scheduler - ON | OFF

Fig. 3: Event Scheduler - ON | OFF

Try to ask your system administration if you haven’t the right privileges to perform this operation.
Let’s suppose that the Event Scheduler is running (ON) and let’s create our first Event by filling the required information on the Editor’s Tabs and clicking on the ‘Save’ button.

 

2.1 Performed Action

The ”Performed Action” Tab (Fig. 4) allows you to edit the event statement, i.e. the specific action performed by the event.

Event Editor - Performed Action

Fig. 4: Event Editor - Performed Action

 

2.2 Advanced

The ”Advanced” Tab (Fig. 5) allows you to set the event properties.

Event Editor - Advanced

Fig. 5: Event Editor - Advanced

There are two type of event:

  1. one-time event (”at”): a one-time event executes one time only;
  2. recurrent event (”every”): a recurrent event repeats its action at a regular interval, and the schedule for a recurring event can be assigned a specific start day and time, end day and time, both, or neither.

The ”Schedule details” frame changes according to the type of the event that is opened in the Events Editor (you can choose the event type using the ”Schedule form” combo).

When creating a new event, you may click on the ”if not exist” check to prevent an error if the event already exists.

 

2.3 Comment

The ”Comment” Tab (Fig. 6) allows you to set the event comment.

Event Editor - Comment

Fig. 6: Event Editor - Comment

 

2.4 SQL

The ”SQL” Tab (Fig. 7) contains the SQL syntax for recreating the current event. This tab will be enabled only after the Event creation.

Event Editor - SQL

Fig. 7: Event Editor - SQL

 

3. Other ways to create Events in HoneyMonitor

There are other ways to create an Event in HoneyMonitor. For instance, you can open the Script Editor and create the Event writing and executing a SQL query. You can also use the command builder if you don’t remember exactly the syntax (Fig. 8)

Script Editor - Writing the syntax for Event?s creation

Fig. 8: Script Editor - Writing the syntax for Event’s creation

 

4. Editing Events

You can open an Event in the Event Editor to enable / disable it or change some of its properties (and rename it as well). You can see also some metadata like the creation date (Fig 9).

Event Editor - Editing an Event

Fig. 9: Event Editor - Editing an Event

 

5. Information about the Execution of the Events

Is there a way to know if an event has been executed successfully?

Sure. You can check the Server Error Log. To do this in HoneyMonitor, open the Server Logs Management Window. You can also click on the button ?Print Debug Information? to get more info  - but make sure you have the right privileges to perform this operation -  (Fig. 10).

Server Logs Management - Error Log

Fig. 10: Server Logs Management - Error Log

 

6. Do you want to know / edit the value of the variable event_scheduler?

HoneyMonitor allows you to choose your preferred way to perform a particular task: you choose the way you prefer.

Below you find some possible solutions:

  1. Open the Server Properties Window and go to the Tab ?Variables?;

  2. Use the Metadata Catalog (Global Variables visualization);

  3. Open the Performance Tuning Monitor and go to the Tab ?Variables?;

  4. Open the Event Editor and check its status bar;

  5. Open the Script Editor and create and execute a one-line script which contains the query ?SHOW VARIABLES LIKE ‘event_scheduler’;?

  6. Click on the Utility / MySQL Command Line Client menu to open a command line client and execute the query ?SHOW VARIABLES LIKE ‘event_scheduler’?;

Do you want to know/edit the value of the variable event_scheduler (or other variable) but you don’t remember the Type, the Handle and the Description of that variable?

Open the Server Properties Window and go to the Tab ?Variables? (Fig. 11) to see those information!

Server Properties Window - Variables? List

Fig. 11: Server Properties Window - Variables’ List

 

7. Event Metadata

The source of metadata for a Scheduled Event is the table information_schema.events (Fig. 12).

Event Metadata

Fig. 12: Event Metadata

 

8. Other Resources

If you want to learn more on HoneyMonitor please visit the Project Home Page, at http://www.honeysoftware.com/honeymonitor, or check out one of the following resources:

9. About the Author

Santo Leto is a two years experience MySQL? DBA and Developer.
Leader and main programmer of the HoneyMonitor Project, he graduated in physics and he lives in Italy, where he works from home.

MySQL: Planet MySQL

Edit Any Web Page in your Browser Just Like a Wiki

Firefox specific bookmarklet which allows local web page edits

Firefox: del.icio.us/tag/firefox

Open IT Online | Introduction

Introduction Open IT Online is a Firefox extension that allows to open and edit your documents from everywhere!Thanks to this extension, you will b...

Firefox: del.icio.us/tag/firefox

It's All Text! :: Firefox Add-ons

Right click on a textarea, select "It's All Text!" and edit the text in the editor of your choice.

Firefox: del.icio.us/tag/firefox

Open IT Online | Introduction

"Thanks to this extension, you will be able to open several types of documents directly in Firefox without needing any software to be installed."

Firefox: del.icio.us/tag/firefox

Avidemux - Main Page

Avidemux is a free video editor designed for simple cutting, filtering and encoding tasks. It supports many file types, including AVI, DVD compatible MPEG files, MP4 and ASF, using a variety of codecs.

opensource: del.icio.us tag/opensource

Page 1 | Next >>