Hi again!
I have a lot of news to you!
Let’s go:
1) This is the what I get when I run the command locale:
debian@sid:~$ locale
LANG=en_GB
LANGUAGE=
LC_CTYPE=“en_GB”
LC_NUMERIC=“en_GB”
LC_TIME=“en_GB”
LC_COLLATE=“en_GB”
LC_MONETARY=“en_GB”
LC_MESSAGES=“en_GB”
LC_PAPER=“en_GB”
LC_NAME=“en_GB”
LC_ADDRESS=“en_GB”
LC_TELEPHONE=“en_GB”
LC_MEASUREMENT=“en_GB”
LC_IDENTIFICATION=“en_GB”
LC_ALL=
debian@sid:~$
2) Then I typed these commands in aterm:
root@sid:/usr/sbin# pg_dropcluster --stop 13 main
root@sid:/usr/sbin# pg_createcluster --locale en_GB.UTF-8 --start 13 main
Creating new PostgreSQL cluster 13/main …
/usr/lib/postgresql/13/bin/initdb -D /var/lib/postgresql/13/main --auth-local peer --auth-host md5 --locale en_GB.UTF-8
The files belonging to this database system will be owned by user “postgres”.
This user must also own the server process.
The database cluster will be initialized with locale “en_GB.UTF-8”.
The default database encoding has accordingly been set to “UTF8”.
The default text search configuration will be set to “english”.
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/13/main … ok
creating subdirectories … ok
selecting dynamic shared memory implementation … posix
selecting default max_connections … 100
selecting default shared_buffers … 128MB
selecting default time zone … America/Sao_Paulo
creating configuration files … ok
running bootstrap script … ok
performing post-bootstrap initialization … ok
syncing data to disk … ok
Success. You can now start the database server using:
pg_ctlcluster 13 main start
Ver Cluster Port Status Owner Data directory Log file
13 main 5432 online postgres /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log
root@sid:/usr/sbin# pg_ctlcluster 13 main start
3) Then, I tried the mix command again, and guess what? The first error message, I almost died:
debian@sid:~/hello/hello$ mix ecto.create
11:52:57.370 [error] GenServer #PID<0.259.0> terminating
** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user “postgres”
(db_connection 2.3.0) lib/db_connection/connection.ex:99: DBConnection.Connection.connect/2
(connection 1.0.4) lib/connection.ex:622: Connection.enter_connect/5
(stdlib 3.13.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
** (Mix) The database for Hello.Repo couldn’t be created: killed
debian@sid:~/hello/hello$
4) But then, I did what you’ve told, and changed the file called pg_hba.conf with the “trust” value;
5) Then I restarted the postgrsql using the command systemctl restart postgresql in Debian.
6) Then I came back to the “hello” directory and tried to type the “mix ecto.create” again… and then… Finally!!!
7) Everything is fine now!!!
I will try to paste a screenshot of my term in this post:
I couldn’t have done it without your help… Thank you so much for your patience…
Now I will be able to follow the other steps on the tutorial I was reading.
A BIG, BIG Thank you!
A bright and happy week for you and your family!!!
Alexandre.