MariaDB Temporary Table: Create, From Select, Index and Drop

MariaDB temporary table created with CREATE TEMPORARY TABLE AS SELECT in VS Code

I created a temporary table in one MariaDB session, and a second session that asked for it a moment later got ERROR 1146. A MariaDB temporary table belongs to one connection: CREATE TEMPORARY TABLE builds it, and disconnecting drops it. Here’s what we’re building, a session-only sales summary: Before You Start: Test Setup and Sample … Read more >>

MariaDB Foreign Key: Add, Cascade, Drop and Fix errno 150

MariaDB ON DELETE CASCADE and SET NULL run in VS Code

ERROR 1005: Can’t create table … (errno: 150 “Foreign key constraint is incorrectly formed”). Your data is fine. The definition is wrong, and one warning tells you which part. Quick answer: a MariaDB foreign key is a constraint that makes a child column match a parent key. Declare it in CREATE TABLE or add it … Read more >>

MariaDB Create Database and User (With GRANT and Login Test)

MariaDB create database and user with GRANT ALL PRIVILEGES and SHOW GRANTS in VS Code

Every new app should get its own MariaDB database and its own login, so a bug in one app can’t read or drop another app’s tables. Quick answer: run CREATE DATABASE app_db;, then CREATE USER ‘app’@’localhost’ IDENTIFIED BY ‘password’; and GRANT ALL PRIVILEGES ON app_db.* TO ‘app’@’localhost’;. You don’t need FLUSH PRIVILEGES. In this tutorial, … Read more >>

How to install MariaDB

How to install mariadb

In this MariaDB tutorial, we will learn how to install MariaDB on Linux, Windows, and Ubuntu. Windows, Linux, and Ubuntu. How to install MariaDB Before the installation process, let us first download MariaDB. Downloading MariaDB To download MariaDB, go to the official page and select the latest version to download: Download MariaDB. The MariaDB software is managed by … Read more >>

What is MariaDB Database

what is MariaDB

MariaDB is one of the popular open-source database management systems in the United States and lots of organizations are using it. In this comprehensive guide, I will take you through everything you need to know about MariaDB, its origins, its unique features, and why it might be the right choice for your next big project. … Read more >>

MariaDB GRANT ALL PRIVILEGES: One Database, Remote and Read-Only

MariaDB grant all privileges on a database verified with SHOW GRANTS in VS Code

To give a user full control of one database, run GRANT ALL PRIVILEGES ON app_db.* TO ‘app’@’localhost’;. That’s the whole answer for MariaDB grant all privileges, and it takes effect right away. Quick answer: create the account with CREATE USER first, then GRANT. Use db.* for one database and *.* only for an admin. You … Read more >>

MySQL vs SQLite: 9 Differences Tested on the Same Schema

MySQL vs SQLite: SQLite 3.54.1 returning database is locked for a second writer

Say you’re building an order tracker for a small shop in Austin: one app, a few hundred orders a month, one process writing. Use SQLite. Once several app servers or users write at the same moment, or you need logins and GRANTs, use MySQL. That’s the MySQL vs SQLite verdict in two lines. SQLite is … Read more >>

PostgreSQL JSON vs JSONB: Differences Shown on the Same Data

PostgreSQL json vs jsonb: GIN index sizes and EXPLAIN plan from a real run

Say you’re saving checkout payloads from Texas and Washington orders that you’ll later filter by state and coupon. Which type? For PostgreSQL json vs jsonb, pick jsonb for almost everything. Use json only to keep the exact input text: key order, duplicate keys and whitespace. JSON vs JSONB in PostgreSQL at a Glance Feature json … Read more >>

MariaDB VARCHAR: Max Length, Data Too Long Errors and VARCHAR vs TEXT

MariaDB VARCHAR max length: ERROR 1074 for VARCHAR(16384) with utf8mb4 in VS Code

A MariaDB VARCHAR(n) column holds up to n characters, not bytes, and MariaDB 13 rejects anything longer instead of cutting it. Here’s a 23-character name going into a VARCHAR(20) column: The error: Quick answer: make the column longer with ALTER TABLE customers MODIFY full_name VARCHAR(40) NOT NULL;, or trim the value before you insert it. … Read more >>

How to Install MySQL on Windows

MySQL Windows Installation Setup

In this MySQL database tutorial, we will learn how to install MySQL in Windows. MySQL is an open-source Relational Database Management System (RDBMS). It is the most popular and widely used database management system. It has become the go-to choice for millions of developers around the world. Prerequisites to Install MySQL on Windows Before we dive into … Read more >>