Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 10 of 49 10 Older Entries

Displaying posts with tag: plugin (reset)

On MySQL plugin configuration
+0 Vote Up -0Vote Down

MySQL offers plugin API, with which you can add different types of plugins to the server. The API is roughly the same for all plugin types: you implement an init() function, a deinit(); you declare status variables and global variables associated with your plugin, and of course you implement the particular implementation of plugin call.

I wish to discuss the creation and use of global variables for plugins.

Consider the following declaration of a global variable in audit_login:

static MYSQL_SYSVAR_BOOL(enabled, plugin_enabled, PLUGIN_VAR_NOCMDARG,
"enable/disable the plugin's operation, namely writing to file", NULL, NULL, 1);

static struct
  [Read more...]
Introducing audit_login: simple MySQL login logfile based auditing
+2 Vote Up -0Vote Down

audit_login is a simple MySQL login auditing plugin, logging any login or login attempt to log file in JSON format.

It seems that audit plugins are all the rage lately... We've developed out simple plugin a month ago as part of our database securing efforts; by auditing any login or login attempt we could either intercept or later investigate suspicious logins.

However we quickly realized there is much more to be gathered by this info.

In very short, you install this plugin onto your MySQL server, and your server starts writing into a text file called audit_login.log entries such as follows:

{"ts":"2013-09-11
  [Read more...]
Comprehensive How-To for Enabling the Standard InnoDB Plugin in MariaDB and MySQL
+4 Vote Up -0Vote Down

I’m always switching back-and-forth between the 2 different InnoDB flavors in MariaDB – XtraDB+ and the standard InnoDB plugin, so I thought I’d simply post all of the various combinations in a single place. (And then I cover enabling the InnoDB Plugin in MySQL, since it’s an option in 5.1.) [Addition: Thanks to Andrew and Sergei for the tips on shortening plugin-load=. The changes are reflected below.]

Note: Below is for Windows. For Linux, simply change “.dll” to “.so” where appropriate.

MariaDB 10.0:

Do not add anything, as the standard InnoDB plugin is the current default (as of 10.0.3, although I do anticipate this changing in the near future, and I’ll update the post accordingly when that happens).

MariaDB 5.5:

# Enable the 2 below to disable XtraDB+ and enable the standard InnoDB
  [Read more...]
MySQL vs Drizzle plugin APIs
+1 Vote Up -0Vote Down

There’s a big difference in how plugins are treated in MySQL and how they are treated in Drizzle. The MySQL way has been to create a C API in front of the C++-like (I call it C- as it manages to take the worst of both worlds) internal “API”. The Drizzle way is to have plugins be first class citizens and use exactly the same API as if they were inside the server.

This means that MySQL attempts to maintain API stability. This isn’t something worth trying for. Any plugin that isn’t trivial quickly surpasses what is exposed via the C API and has to work around it, or, it’s a storage engine and instead you have this horrible mash of C and C++. The byproduct of this is that no core server features are being re-implemented as plugins. This means

  [Read more...]
Quiet Release MySQL Plugin 12.1.0.1.2 — Bug Fixes
+1 Vote Up -0Vote Down

This is just a small bug-fix release of the plugin. It has actually been quietly released for a while now. If you have downloaded the plugin recently, you have the latest version. To be sure, check the version in the Console, or you can see it in the file name.

There are two bugs fixed:
1. Deployment on an OMS hosted on Solaris didn’t work. (And I suspect it could be the same for Agents on Solaris.)
2. Changing thresholds on the metrics caused the error “Modification of Target Monitoring Settings has Failed”. Also, applying monitoring template was failing for the same reason.


If you didn’t know that you could setup threshold and customized the thresholds that are set out of the box with the plugin, then you are not fully using Enterprise Manager. You can do that in the MySQL target menu — Monitoring -> Metric and



  [Read more...]
MySQL Syslog Audit Plugin
Employee_Team +4 Vote Up -0Vote Down

This post shows the construction process of the Syslog Audit plugin that was presented at MySQL Connect 2012. It is based on an environment that has the appropriate development tools enabled including gcc,g++ and cmake. It also assumes you have downloaded the MySQL source code (5.5.16 or higher) and have compiled and installed the system into the /usr/local/mysql directory ready for use. 

The information provided below is designed to show the different components that make up a plugin, and specifically an audit type plugin, and how it comes together to be used within the MySQL service. The MySQL Reference Manual contains information regarding the plugin API and how it can be used, so please refer

  [Read more...]
Announcing MySQL Plugin 12.1.0.1.0 for Oracle Enterprise Manager 12c Cloud Control
+1 Vote Up -0Vote Down

MySQL management plugin for EM 12c has been long overdue. I’ve initially migrated the older plugin to EM 12c about 6 months ago, and few dozen people received this as the initial beta of the plugin. It worked OK but didn’t use any of the new 12c features, and its home page was a bit of a mess in the EM 12c Cloud Control web interface.

I’ve had lots of new features to add, but I didn’t really have much time to invest into completing them all. Finally, I decided to just finish the home page dashboard and clean it up from all unfinished new features. I did, however, finish MySQL Slave configuration and status monitoring, which was the largest gap in the the functionality of the previous plugin. There is no custom UI for MySQL slave

  [Read more...]
Understanding SHOW VARIABLES: DISABLED and NO values
+1 Vote Up -0Vote Down

When you use SHOW VARIABLES LIKE “have_%” to see whether a particular feature is enabled, you will note the value of NO for some, and DISABLED for others. These values are not intrinsically clear for the casual onlooker, and often cause confusion. Typically, this happens with SSL and InnoDB. So, here is a quick clarification!

  • NO means that the feature was not enabled (or was actively disabled) in the build. This means the code and any required libraries are not present in the binary.
  • DISABLED means that the feature is built in and capable of working in the binary, but is disabled due to relevant my.cnf settings.
  • YES means the feature is available, and configured in my.cnf.

SSL tends to show up as DISABLED, until you configure

  [Read more...]
Thoughts on using MySQL plugins
+3 Vote Up -0Vote Down

I'm giving thoughts on the viability of MySQL plugins. This is due to a particular experience I've had, which is thankfully solved. However, it left some bitter taste in my mouth.

MySQL plugins are a tricky business. To create a plugin, you must compile it against the MySQL version you wish the users to use it with. Theoretically, you should compile it against any existing MySQL version, minors as well (I'm not sure whether it may sometimes or most times work across minor versions).

But, most important, you must adapt your plugin to major versions.

Another option for plugin makers, is to actually not recompile it, but rather provide with the source code, and let the end user compile it with her own MySQL version. But here, too, the code must be compatible with whatever changes the new MySQL version may have.

And if it doesn't compile with the  [Read more...]

MariaDB User Feedback
+5 Vote Up -0Vote Down

One thing which we, as developers of MariaDB, run into is that our personal database needs are not the same as many of our users. In fact, our needs are quite light compared to many. We have a MariaDB website, a company website, a knowledgebase, this blog, and that’s about it. None of them are particularly high traffic compared to what our customers have. But apart from talking to our customers, which are just a small percentage of the total MariaDB population, we wanted to have a way of finding out how MariaDB is used “in the real world”, so to speak.

Asking lots and lots of people to fill out surveys isn’t any fun, and we would have to keep repeating the survey ad nauseum to get useful information over time on trends and

  [Read more...]
Showing entries 1 to 10 of 49 10 Older Entries

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.