Posts

Speak About MySQL At SCaLE 23x

Image
I help facilitate the MySQL track at SCaLE. I am seeking first-time presenters who can discuss MySQL.  I am also looking for old-timers who haven't spoken in a while at a conference and those who have forgotten to submit a talk.  The MySQL Community is at a crossroads, and the MySQL track will cap off a day with a panel on the past, present, and future of MySQL.  T he 23rd Annual Southern California Linux Expo –   SCaLE 23X   – will be held   March 5-8, 2026   at the   Pasadena Convention Center   in Pasadena, California, near Los Angeles. You are invited to share your work on  FOSS programs  and  open hardware projects  with the rest of the community, as well as exchange ideas with some leading experts in these fields. Please share your MySQL skills and experiences! You can make a significant impact by sharing with others, and this is an excellent opportunity to professionally network at the largest open-source ...

CSV File Load Error - Data Too Long or Value Too Long

  You are trying to load a CSV file into a database, and almost inevitably, you run into an  ERROR: value too long for type character varying 64  if you are using PostgreSQL.  Or  SQL Error [1406] [22001]: Data truncation: Data too long for column 'Name' at row 1  if you are using MariaDB or MySQL. It doesn't matter if you are using the  DBeaver  application or the native database import tools. Newbies will look at the first line of the CSV file to examine the very first line and scratch their heads, as there is no error in the first line. The database is ingesting the data one line at a time, so each line in the file is the first line. Your line in the CSV file is hiding deep in the file. And there may be many of them in there.  The error message you receive is helpful, but it DOES NOT tell you which line in the CSV file is causing you this grief. You could use an 'eyeball inspection' of the data, which quickly becomes tedious. And if the CS...

Migrating From MySQL To PostgreSQL in Five Simple Steps

Image
There are many reasons you may want to migrate from MySQL to PostgreSQL, which we will skip over for brevity.  I see many questions about moving tables and data, and sadly, the answers range from sloppy to incredibly complicated.  Each database migration is unique, as issues range from heavily relying on a vendor's feature to extremely complex schemas that require attention to minute detail. Step 1 This may seem obvious, but the first step is access to the original 'source' database. You will need FULL admin access to the database.  If you do not have full access for security, administrative, or other reasons, you will most likely not receive all the desired data.  We will use DBeaver Enterprise to connect to the source database. We need to choose a MySQL database driver Configure the connection We will be porting the World database. In this example, we will port the MySQL World database. This dataset has been used for decades in MySQL documentation, training, and ex...

Do You Need An AI Assistant?

Image
 Artificial Intelligence has been over hyped the last several years. But one of the bright, shining spots for AI is acting as an assistant. a super-powerful IDE, when working with a database. Example You want to find your top three customers in the Sakila database. This database has been used for decades in the MySQL world. As your question in English (or another language) The '@ai' directs the rest of the prompt to the DBeaver Artificial Intelligence Assistant See the generated SQL Here is the generated Structured Query Language And get the results. Now we have the top three customers without having to write any SQL directly Fixing Mistakes Occasionally, you may 'fat finger' a query.  I will take the query from above and change first_name to just first .   SELECT c . customer_id , c . first , c . last_name , SUM ( p . amount ) AS total_revenue FROM customer AS c JOIN payment AS p ON c . customer_id = p . customer_id GROUP BY ...

PG NYC 2025

  PG NYC  2025 starts November 29th, and you can find me in the DBeaver booth.  This event has become one of my favorites, packed with three days of intense content. And it will all happen less than a week after the release of PG 18. Tickets are still available if you can make it to Manhattan. And I will be demoing new DBeaver features, including talking to the AI Assistant. Please stop by the booth to see it.

Using AI To Track Formula 1 Drivers With MySQL

Image
 Formula 1 Car Racing is very popular, and tracking the performance of each team or driver can be quite complex. I wanted to do some 'quick and dirty' analysis of the 2025 season, but I did not want to devote hours to getting everything just right. So, I used DBeaver Enterprise 's AI Assistant Feature. DBeaver's AI Assistant I connected to my local MySQL server and entered this prompt: Create a table to hold information on this seasons performance of Formula 1 drivers to hold their name, car manufacturer, race location, and the drivers points earned for each race, Then collect the data for inclusion in the table This was sent to OpenAI, which returned with: Sure, I can help you create the table. However, I can't collect the data for you as I'm an AI and don't have access to external databases or the internet. You'll need to collect the data yourself and insert it into the table. Here's how you can create the table: CREATE TABLE formula1_season_perfor...

The MySQL SQL Error 1064 Blues

Image
          Writing error messages is an art. Sadly, most of us lack talent in that area. One of the prime examples that you see with SQL User Interfaces is the MySQL SQL Error 1064. SQL Error [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select @var' at line 2 Error position: line: 1 Explicit and clear, it ain't.  I am using DBeaver for this example, but the issue can be reproduced on MySQL Workbench, Toad, and many other tools.  In the following, an environment variable is set on the first line, and then a SELECT is used to return that variable. However, we receive a response of 1064.  So what happened?  While both lines were input to the console, only the second line was executed. When we ask the server about @var, it has no knowledge of it and replies with the 1064 Error. "But we typed it in!" Yeah, we typed it in, but the set was not e...