Gelato_Candy

Gelato_Candy

hi my latest phoenix and elixir, psql (PostgreSQL) 15.3 (Debian 15.3-1.pgdg110+1)
had an issue

it always ** (Mix) The database for MyApp.Repo couldn’t be created: ERROR XX000 (internal_error) template database “template1” has a collation version mismatch
but there’s no “template1” database in my psql, and i dont even create that database before

hint: Rebuild all objects in the template database that use the default collation and run ALTER DATABASE template1 REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.                                 

The template database was created using collation version 2.36, but the operating system provides version 2.37.

when i try to run mix ecto.create and also all my previous database project had and warning about the collation version mismatch, because of that,i cant run mix ecto , so i cant add or create or update new database for my project

Showing Posts 1 to 4

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

Hey @Gelato_Candy this isn’t really specific to Phoenix / Ecto, this is a postgres issue. The message indicates what to do. Connect to your database via psql and run: ALTER DATABASE template1 REFRESH COLLATION VERSION. You may need to do this to other databases beyond template1.

Gelato_Candy

Gelato_Candy OP

but on my ecto there’s no “template1” database available , also i cant even run the mix ecto.create in my phoenix project so i cant connected to my desired database if i cant even create that database

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

Again this isn’t about ecto. Your postgres is broken and you need to fix it before ecto can connect to it. You need to use psql. Go to your terminal and type psql template1.

See: https://dba.stackexchange.com/questions/324649/collation-version-mismatch

Gelato_Candy

Gelato_Candy OP

oh my god, its so simple than i thought

ALTER DATABASE template1 REFRESH COLLATION VERSION;
NOTICE: changing version from 2.36 to 2.37

thankyou so much, really appreciate

— All posts loaded —

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
mnkhod
So i have been using ash framework for a while and i love it. However currently the issue im having with ash framework is the error handl...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews