MariaDB fixes #93

Closed
opened 2026-02-05 17:07:35 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @Im-0xC7 on GitHub (Jun 8, 2024).

  1. MariaDB is not listed as an option while setting up the database (php artisan p:environment:database), though setting up with the mysql option and changing mysql to mariadb in the .env file works fine
  2. The getting started docs note that the minimum version required for MariaDB is 10.3, but the database uses the UUID data type which wasn't introduced until 10.7

Tested on panel v1.0.0-beta4

Originally created by @Im-0xC7 on GitHub (Jun 8, 2024). 1. MariaDB is not listed as an option while setting up the database (`php artisan p:environment:database`), though setting up with the `mysql` option and changing `mysql` to `mariadb` in the .env file works fine 2. The getting started docs note that the minimum version required for MariaDB is 10.3, but the database uses the UUID data type which wasn't introduced until 10.7 Tested on panel v1.0.0-beta4
Author
Owner

@Boy132 commented on GitHub (Jun 9, 2024):

  1. The mysql driver works for both mysql and mariadb.
  2. We don't use the uuid data type. All uuid columns are char(36)
@Boy132 commented on GitHub (Jun 9, 2024): 1. The `mysql` driver works for both mysql and mariadb. 2. We don't use the uuid data type. All uuid columns are `char(36)`
Author
Owner

@Im-0xC7 commented on GitHub (Jun 10, 2024):

  1. The mysql driver works for both mysql and mariadb.

If I don't have a MySQL client installed I cannot use the mysql type, so changing mysql to mariadb in the .env allows me to use a MariaDB client (Just tested, gives mysql not found)

  1. We don't use the uuid data type. All uuid columns are char(36)

Migration 2022_05_28_135717_create_activity_logs_table uses the uuid type for the batch column, so attempting to run php artisan migrate --seed --force fails on any version earlier than 10.7 (Tested with panel v1.0.0-beta5 and MariaDB 10.6)

@Im-0xC7 commented on GitHub (Jun 10, 2024): > 1. The `mysql` driver works for both mysql and mariadb. If I don't have a MySQL client installed I cannot use the `mysql` type, so changing `mysql` to `mariadb` in the .env allows me to use a MariaDB client (Just tested, gives `mysql not found`) > 2. We don't use the uuid data type. All uuid columns are `char(36)` Migration `2022_05_28_135717_create_activity_logs_table` uses the `uuid` type for the `batch` column, so attempting to run `php artisan migrate --seed --force` fails on any version earlier than 10.7 (Tested with panel v1.0.0-beta5 and MariaDB 10.6)
Author
Owner

@Boy132 commented on GitHub (Jun 10, 2024):

If I don't have a MySQL client installed I cannot use the mysql type, so changing mysql to mariadb in the .env allows me to use a MariaDB client (Just tested, gives mysql not found)

I see. That is a known issue. The mysql alias is missing in newer mariadb versions.

Migration 2022_05_28_135717_create_activity_logs_table uses the uuid type for the batch column, so attempting to run php artisan migrate --seed --force fails on any version earlier than 10.7 (Tested with panel v1.0.0-beta5 and MariaDB 10.6)

No, that is still not a uuid datatype on the database. It's just a short way of creating a char(36).

@Boy132 commented on GitHub (Jun 10, 2024): > If I don't have a MySQL client installed I cannot use the `mysql` type, so changing `mysql` to `mariadb` in the .env allows me to use a MariaDB client (Just tested, gives `mysql not found`) I see. That is a known issue. The `mysql` alias is missing in newer mariadb versions. > Migration `2022_05_28_135717_create_activity_logs_table` uses the `uuid` type for the `batch` column, so attempting to run `php artisan migrate --seed --force` fails on any version earlier than 10.7 (Tested with panel v1.0.0-beta5 and MariaDB 10.6) No, that is still not a `uuid` datatype on the database. It's just a short way of creating a `char(36)`.
Author
Owner

@Im-0xC7 commented on GitHub (Jun 11, 2024):

Migration 2022_05_28_135717_create_activity_logs_table uses the uuid type for the batch column, so attempting to run php artisan migrate --seed --force fails on any version earlier than 10.7 (Tested with panel v1.0.0-beta5 and MariaDB 10.6)

No, that is still not a uuid datatype on the database. It's just a short way of creating a char(36).

Either way, MariaDB versions before 10.7 don't recognize the uuid type/alias (at least from my tests on 10.3 & 10.6), so attempting to run the migrations fails

@Im-0xC7 commented on GitHub (Jun 11, 2024): > > Migration `2022_05_28_135717_create_activity_logs_table` uses the `uuid` type for the `batch` column, so attempting to run `php artisan migrate --seed --force` fails on any version earlier than 10.7 (Tested with panel v1.0.0-beta5 and MariaDB 10.6) > > No, that is still not a `uuid` datatype on the database. It's just a short way of creating a `char(36)`. Either way, MariaDB versions before 10.7 don't recognize the `uuid` type/alias (at least from my tests on 10.3 & 10.6), so attempting to run the migrations fails
Author
Owner

@Boy132 commented on GitHub (Jun 11, 2024):

Migration 2022_05_28_135717_create_activity_logs_table uses the uuid type for the batch column, so attempting to run php artisan migrate --seed --force fails on any version earlier than 10.7 (Tested with panel v1.0.0-beta5 and MariaDB 10.6)

No, that is still not a uuid datatype on the database. It's just a short way of creating a char(36).

Either way, MariaDB versions before 10.7 don't recognize the uuid type/alias (at least from my tests on 10.3 & 10.6), so attempting to run the migrations fails

It has to be something different. I'm using mariadb 10.5 just fine. (although with the mysql driver)

Please use the mysql driver for now and manually create the mysql alias with ln -s /usr/bin/mariadb /usr/bin/mysql.
If you still have problems visit the Discord and open a support thread with some information, like mariadb version, os and the errors you are getting.

@Boy132 commented on GitHub (Jun 11, 2024): > > > Migration `2022_05_28_135717_create_activity_logs_table` uses the `uuid` type for the `batch` column, so attempting to run `php artisan migrate --seed --force` fails on any version earlier than 10.7 (Tested with panel v1.0.0-beta5 and MariaDB 10.6) > > > > > > No, that is still not a `uuid` datatype on the database. It's just a short way of creating a `char(36)`. > > Either way, MariaDB versions before 10.7 don't recognize the `uuid` type/alias (at least from my tests on 10.3 & 10.6), so attempting to run the migrations fails It has to be something different. I'm using mariadb 10.5 just fine. (although with the `mysql` driver) **Please use the `mysql` driver for now** and manually create the mysql alias with `ln -s /usr/bin/mariadb /usr/bin/mysql`. If you still have problems visit the Discord and open a support thread with some information, like mariadb version, os and the errors you are getting.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel-pelican-dev#93