Skip to content

Databases

MariaDB Database Management in VS Code

DBCode is a MariaDB extension for VS Code: connect, browse schemas and data, write queries with schema-aware autocomplete, and edit rows visually without switching tools. Install DBCode to get started, or see how it compares to standalone database tools.

MariaDB is a community-developed, commercially supported fork of the MySQL relational database management system. It stands out with these distinctive advantages:

  • Enhanced performance: Optimized storage engines and query optimizer
  • Greater storage engine support: Including Aria, ColumnStore, Spider, and MyRocks
  • Advanced features: Window functions, common table expressions, and temporal data tables
  • Stronger security: Default encryption for tables, data, logs, and communications
  • Open development model: Community-driven with transparent governance

MariaDB ensures MySQL compatibility while providing additional features, making it an excellent choice for organizations seeking a powerful, open-source database solution.

To connect to MariaDB in DBCode:

  1. Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
  2. Add a New Connection: Click on the “Add Connection” icon.
  3. Complete connection form: Select MariaDB as the database type and enter:
    • Host address (default port: 3306)
    • Authentication credentials (username/password)
    • Database name (optional)
    • SSL/TLS settings (if required)
  4. Connect: Click save to connect to your MariaDB database.
  5. Start Managing Your Databases: Once connected, explore tables, views, and run queries.

For detailed instructions on connecting to MariaDB, refer to the Connect article.

On Amazon RDS and Aurora, sign in with an AWS authentication profile instead of a password. DBCode creates and refreshes the IAM token for you.

DBCode can sign in to MariaDB accounts that use the gssapi authentication plugin with your current operating-system credential. Select Integrated (Kerberos) instead of entering a password.

  • On Windows, DBCode uses the current signed-in identity through the Kerberos SSP. It does not use Negotiate or fall back to NTLM.
  • On macOS and Linux, DBCode uses the ticket already in your credential cache (kinit beforehand). It does not acquire tickets.
  • MariaDB still needs a username. Enter the MariaDB account name that is mapped to your Kerberos principal.
  • The server tells DBCode which service principal to use, so there is no service name setting. Host, socket, and SSH tunnel connections all work.
  1. Ask the server administrator to load auth_gssapi, set gssapi_keytab_path and, if needed, gssapi_principal_name, and create your account with IDENTIFIED VIA gssapi (or IDENTIFIED VIA gssapi AS 'user@REALM').
  2. Select Integrated (Kerberos) and enter the MariaDB username.
  3. Configure SSL/TLS normally. Kerberos authenticates you, and TLS encrypts the connection. We recommend SSL/TLS with full certificate verification for Integrated connections, because the server’s identity is verified by TLS, not by Kerberos.

Backup and restore run through local client tools and need Username / Password authentication.

SymptomWhat to check
Kerberos context initialization failsRun klist to confirm you have a ticket, and check your realm configuration.
GSSAPI name mismatch (or Access denied) after Kerberos succeedsThe account name or its AS principal does not match your Kerberos identity.
Integrated authentication is unavailableReconnect to let DBCode install the Kerberos component, then check the Output panel.

A number of cloud providers offer MariaDB as a service, including AWS RDS, Azure Database for MariaDB, and Google Cloud SQL. To connect to a cloud provider and access multiple databases:

  1. Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
  2. Add a New Connection: Click on the “Add Connection” icon.
  3. Select Your Provider: Choose the cloud provider from the list on the right.
  4. Authenticate: Follow the authentication process specific to the provider.
  5. Start Managing Your Databases: Once connected, you can manage multiple MariaDB instances.

For detailed instructions on connecting to cloud providers, refer to the Connect a Cloud Provider article.

With DBCode, you can perform these essential tasks when working with MariaDB:

  • Data Browsing & Editing: View and edit table data with an intuitive grid-based interface
  • Schema Management: Create, alter, and drop tables, views, and other database objects
  • Procedure & Function Editor: Create and edit stored procedures with syntax highlighting
  • Data Import/Export: Import data from CSV/JSON files and export query results
  • Relationship Visualization: View table relationships with interactive ER diagrams
  • Query History: Access and reuse your previously executed queries

By using MariaDB with DBCode, you can leverage these powerful features within the familiar VS Code environment, streamlining your database development workflow.

DBCode shows MariaDB scheduled events in an Events folder under each database, next to Tables and Views. Each event row shows its schedule and status, with the definer, start and end boundaries, and last run time in the tooltip.

  • Enable and disable: Right-click an event to enable or disable it. The row’s status and available action update immediately.
  • Edit definitions: Open an event to view or edit its definition, applied with CREATE OR REPLACE EVENT.
  • Create events: Right-click the Events folder to create a new event from a template.

The Events folder appears only when Progressive Loading is enabled in the connection’s advanced settings. A connection that was already using Progressive Loading before events support keeps its cached schema, so refresh the database once to pick up the folder.

Two behaviors worth knowing:

  • If an applied definition is rejected, the original is not preserved; the definition stays open in the editor to fix and re-apply.
  • Events only fire when the server’s event_scheduler is ON. DBCode surfaces it in the monitoring panel’s System Info, as a scheduler that is off is the most common reason an event never runs.

The Advanced section of the connection editor exposes pool tuning options alongside the existing Editor Connection Idle Timeout setting.

The maximum number of concurrent connections DBCode opens per database for this connection. The default is 10.

Lower this value when the server enforces a per-user connection limit (MariaDB max_user_connections). A lower ceiling serializes concurrent queries rather than returning an error when the limit is reached.

How long an idle pooled connection is kept open before it is closed, in seconds. The default is 300 seconds.

Lower this value to release connections sooner on servers with a tight connection limit.

For more information about MariaDB, check out MariaDB.