ChatGPT is truly impressive. You can instruct it to do all sorts of things when they can be communicated in plain text. Software developers are already using it to write code or improve SQL queries, among many other things. But ChatGPT can also act as software. For example, if you tell it the following:
Act as the mariadb command line tool.
Only reply to commands with output in one single code block.
Do not write any explanations.
Expect English messages in {curly brackets}.
My first command is SELECT VERSION();
Then you’ll get this answer:
Isn’t that impressive? There. Now you have a new way to get started with MariaDB without installing anything. I mean, that was even faster than using Docker on your browser!
Let’s show the available databases (or schemas):
SHOW DATABASES;
Can we create a new database?
CREATE DATABASE test;
Yes, we can! How about creating a new table and inserting data?
CREATE TABLE test.messages(content TEXT);
INSERT INTO test.messages VALUES("Hi MariaDB 👋");
Query OK, 1 row affected. It seems to be working! Let’s double-check that the data is stored:
SELECT * FROM test.messages;
Hi MariaDB 👋! This is so cool! Open a new tab in your browser and try it out to see it in action.
When you want to stop ChatGPT from acting like a MariaDB database, just tell it to do so:
{stop acting like mariadb}