Showing entries 1 to 5
Displaying posts with tag: dynamic (reset)
Dynamic MySQL Credentials with Vault

Recently I have been looking at the Vault project as a means to manage secrets for applications and end-users. One of the use cases that immediately drew my attention was the ability to create dynamic role-based MySQL credentials.

Why Dynamic MySQL Credentials?

There are a few reasons why dynamic credentials would be beneficial, all of which can be handled by Vault, including:

  • The database environment is too large to manage individual users.
  • A need to authenticate on an external service, such as LDAP or GitHub organization.
  • Provide credentials to external resources, such as auditors or outside consultants that automatically expire.
  • Compliance requirements for strict audit logs for database access.

A High-Level Overview of Vault

Vault is a fairly new project by HashiCorp, the folks behind projects …

[Read more]
Automatic Logging of Table Data Changes and Creation of Backups via a Stored Procedure


The stripped down stored procedure shown below will accept any Data Manipulation Language statement as its parameter and automatically log the statement and create table backup copies before the statement is executed. The logging functionality is similar to MySQL's binary log but exclusive to DML statements and is useful for table data recovery operations, such as undoing the last table data change or to revert databases back to a certain point in time. All this is done exclusively using stored routines (procedures and functions).

Its assumed that the databases and tables that will be used are already formed to specific business requirements since DDL statements will not be logged by the stored procedure. Though logging of table data changes can also be achieved using triggers, it is not practical to alter each and …

[Read more]
A function to get all the columns of any table from any database


Certain complex MySQL SELECT and subquery statements will not allow the use of the * wildcard and you will need to fill in the entire column list of a given table. Consider the following simplified example, a SELECT statement that contains 3 columns. The asterisk here refers to all columns, which is actually the 3 columns listed in the GROUP BY clause:

FROM `dbName_A`.`tableName_A`
FROM `dbName_B`.`tableName_B`
AS `compareTables`
GROUP BY `column_1`, `column_2`, `column_3`
1, 0);

Imagine if it were dozens of columns instead of just 3. You can't simply put in the * wildcard like 'GROUP BY * '. The above example will not …

[Read more]
Creating an Ajax Autocompletion Text Field with Dynamic Faces

Hi all,

Today I'd like to start a blog series in which I highlight Web application tutorials for NetBeans 6.5. A few changes have been made to tutorials, among which is the featuring of MySQL as the database of choice.

This first entry in the series will cover the tutorial, "Creating an Ajax Autocompletion Text Field with Dynamic Faces", which is based on a NetBeans Community Docs tutorial by Bilal Ahamed.

This tutorial demonstrates the usage of the Woodstock JSF 1.2 Text Field component with Ajax functionality provided by the Project Dynamic Faces component library. Dynamic Faces, also known as POJC (Plain Old JavaServer Faces Components), are an extension to JavaServer Faces technology that lets you easily implement Ajax functionality. In particular, …

[Read more]
Unintentional Googlewhack Leads to MySQL Bug Report

While doing a standard audit for a new client, I recommended a few changes to get better performance. Because I had several changes, I used the documentation at

and found that innodb_flush_log_at_trx_commit is a dynamic variable. I was surprised, because most operations dealing with file sizes and operations are not dynamic. But the client proceeded with:

set global innodb_flush_log_at_trx_commit = 2;

and got:

ERROR 1193 (HY000): Unknown system variable 'innodb_flush_log_at_trx_commit'

So I searched for others who may have had the same error, and ended up getting an unintentional googlewhack. Well, it’s not a real Googlewhack, because it has more than 2 …

[Read more]
Showing entries 1 to 5