rustmysql-connectorrust-dieselrust-diesel-mysql

unsupported buffer type when running migrations


So, my problem is that I cannot successfully run migrations in my Rust/Diesel backend web app using MySQL as the database on Windows 11.

I have tried two different MySQL lib/DLL file versions (8.3 and 8.0) and have reinstalled the Diesel CLI. I also installed the MySQL community server side by side with my XAMPP installation with MariaDB, neither one works, but the error message is the same.

Rust version: rustc 1.75.0 (82e1608df 2023-12-21)

MySQL version: 8.0.36 (MySQL Community Server) (EDIT: formerly 8.3.0)

The actual error message when running either diesel setup or diesel migration run is the following:

Using unsupported buffer type: 253  (parameter: 1)

My first migration file (up.sql) looks like this:

CREATE TABLE categories (
  id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
  name TEXT NOT NULL,
);

Here's my Cargo.toml:

[package]
name = "budget"
version = "0.1.0"
edition = "2021"

[dependencies]
chrono = { version = "0.4.24", features = ["serde"] }
rocket = { version = "0.5.0", features = ["json"] }
diesel = { version = "2.1.0", features = ["mysql", "chrono"] }
diesel_migrations = "2.1.0"
dotenvy = "0.15"
rocket_db_pools = { version = "0.1.0", features = ["diesel_mysql"] }

I'm very new to Rust and would appreciate even if someone could point me in the right direction. I don't currently know where to start looking for the underlying problem. I can provide more information as needed.


Solution

  • I managed to solve the problem:

    After that, running diesel setup and diesel migration run/redo/revert worked.