Community journal

The latest from the MySQL community

Ideas, releases, practical guides, and perspectives from the people building with MySQL.

Follow the feed
Showing entries 1 to 10 of 12 « Previous | Next »
Displaying posts with tag: extension (reset)
Advanced Cryptography in MySQL with vsql-crypto

There are a few cryptography tasks that are common to many backends. For example, you should store passwords such that a database leak doesn't expose them, you should sign payloads so the receiving side can verify them, you should keep a column's data unreadable outside the database, and you should mint tokens an attacker cannot guess. MySQL's built-in functions cover part of that ground but fall short for many users. The SHA2() function will hash a password, but nothing salts it for you, so two people who pick the same password end up with the same stored value. MySQL does not have a built-in HMAC function. An HMAC is the keyed hash a receiver uses to tell a real message from a forged one.

When a database doesn't solve a problem natively, the work invariably moves up into application code, where every service reimplements it just a little bit differently. This adds ongoing maintenance complexity.

The …

[Read more]
OAuth2 and JWT Logins for MySQL

An engineer leaves your company. You disable their single sign-on account, and their access to the wiki, the cloud console, and the CI system goes with it. Typically, access to database resources doesn't follow such a simple plan. Database user and role maintenance too often happens within the database, oblivious to single sign-on. User accounts carry a password which has to be managed and rotated (and the password is probably already sprawled out across shell history and a shared password manager).

An easier way to manage this is to bring the identity-provider model to the database. This is what the VillageSQL Server vsql-oauth2 extension does. It adds an authentication method that accepts an OAuth2/OpenID Connect token (a JWT) from your identity provider in place of a password. Your identity provider decides who can log in, MySQL privileges decide what they can do …

[Read more]
Announcing VillageSQL Server 0.0.6

VillageSQL Server 0.0.6 is now available. This release advances the mainline to MySQL Server 8.4.11 and adds support for MySQL Server 9.7.2 and Percona Server 8.4.10.

Highlights of this release include the following:

  • An extension can now log you in, so your identity provider decides who gets into the database.
  • Extensions can call the server's own internal component services, which opens up a large part of the MySQL surface area.
  • A privilege of its own now covers extension management, so you can grant that and nothing else.
  • If you build a custom type incorrectly, you find out when you compile the extension or when you install it, rather than when someone runs a query.

VillageSQL now runs on MySQL Server 9.7 and Percona Server 8.4

VillageSQL Server 0.0.6 adds a mysql-9.7 build that tracks the MySQL Server 9.7.2 tree, and a percona-8.4 build …

[Read more]
Aligning MySQL Extensions with Existing Component Services

When something goes wrong inside MySQL, the server says so in the error log. It's what administrators already watch. Every entry carries a severity and an error code, and you can query it from performance_schema.error_log like any other table. It is the server's place for communicating "something here needs your attention." This is an example of a service that MySQL provides out of the box. Since 8.0, MySQL's component framework has been able to leverage these services, and now the VillageSQL Extension Framework can too.

VillageSQL is a drop-in replacement for MySQL that lets you run your own code inside the server. The VillageSQL Extension Framework (VEF) gives you a channel to expand MySQL via portable extensions written in C++ or Rust, …

[Read more]
Fuzzy String Search for MySQL

MySQL's string matching is precise by design. LIKE '%shirt%' finds "shirt." It won't find "shrt" or "shrit" or anything a user actually typed when they meant "shirt." Handling that in MySQL means regex patterns that grow unwieldy or full-text search that doesn't rank results by closeness. Usually it means punting the whole problem to the application layer.

Two VillageSQL extensions bring fuzzy matching into SQL: vsql-trgm for character-level similarity, and vsql-fuzzystrmatch for edit distance and phonetic matching. They solve different problems — knowing which to reach for is half the work. VillageSQL is a drop-in replacement for MySQL — if you're running MySQL, you can swap it in and install extensions without changing your application.

Trigrams: when strings look …

[Read more]
Your MySQL Schema is Already a REST API

You have a table. You need to serve it over HTTP.

The standard path requires you to write a service in Node or Python or Go, wire up routes, translate query parameters into WHERE clauses, serialize rows as JSON, add auth middleware, deploy it separately from the database, and then watch two dashboards instead of one.

None of that is particularly hard. It's just infrastructure that re-derives what your schema already says. For internal tools, admin panels, mobile app backends, and prototypes, that's often most of the work between the schema and a usable API.

vsql-rest skips that layer. It's inspired by PostgREST, with a similar idea: your tables as REST endpoints, no code required. The MySQL world also has Oracle's MySQL REST Service, which takes a …

[Read more]
Extend MySQL Using Rust

VillageSQL launched with C++ as the language for writing extensions — C++ is familiar territory for MySQL developers. Rust has become a go-to language for systems and infrastructure developers: the same people who build database connectors, storage engines, and performance-critical services. VillageSQL's new Rust SDK adds it as a first-class option: write and ship a VillageSQL extension entirely in Rust without touching C++.

The architectural approach is similar to pgrx for PostgreSQL: bind directly to the server’s extension ABI rather than going through a client library. That's what opened PostgreSQL extension development to Rust developers, so it's the model we are following too.

What it looks like

We'll use a rot13 function to walk through the mechanics …

[Read more]
Porting PostgreSQL Extensions to MySQL using Agent Skills

VillageSQL is a tracking fork of MySQL that adds the VillageSQL Extension Framework (VEF). Extensions are written in C++ (with a Rust SDK coming soon), packaged as .veb bundles, and installed with SQL. The fastest way to understand what VEF can do is to build something with it. To make getting started a bit easier, we published a skill you can run in a local CLI agent session (for example, Claude Code) to build new or port an existing extension.

Agents are “smart” so they could probably figure out how to build an extension on their own through trial and error. This skill allows you to save tokens by skipping some of that trial and error and using a framework/workflow that consistently works and has been improved through multiple iterations.

If you don't have VillageSQL installed already, you can get it with this install script:

curl -fsSL …
[Read more]
Announcing VillageSQL Server 0.0.4

VillageSQL Server 0.0.4 is now available (and marked as the stable release for installs). 0.0.4 takes the parameterized types and SQL integration from 0.0.3 and extends them in two directions:

  • smarter server reasoning (inference rules, custom aggregates)
  • operational completeness (config, metrics, secrets management)

Extensions stop being things you install and hope work; they become things you can configure, monitor, and manage like any other part of the server.

Area What's new Why it matters
VEF v3 New vsql namespace, compile-time validation, custom aggregate functions Catch signature errors at build time; define aggregation logic for custom types
Type …
[Read more]
How to install Phalcon PHP framework in Ubuntu linux?

Well, we have all heard about the fastest php framework out there. But how do we install it in a Ubuntu Linux machine.

Default process for any linux setup.

Steps:

1. First, we need  a few packages previously installed. To install them, issue the distro specific command in your linux terminal.

For Ubuntu:

sudo apt-get install php5-dev php5-mysql gcc libpcre3-dev

For Fedora:

sudo yum install php-devel php-mysqlnd gcc libtool

For RHEL:

sudo yum install php-devel php-mysql gcc libtool

For Suse:

yast2 -i php5-pear php5-devel php5-mysql gcc

Basically, here we are installing the dev tools we require to compile and setup the Phalcon extension.

2. Get the Phalcon build using git

git …

[Read more]
« Previous | Next »