Last active
October 15, 2024 16:02
-
-
Save futuri/e2aa7f28a52116f62989b700af913814 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -u postgres psql | |
postgres=# create database mydb; | |
postgres=# create user myuser with encrypted password 'mypass'; | |
postgres=# grant all privileges on database mydb to myuser; | |
psql -c "ALTER USER usuario WITH PASSWORD 'nueva_password'" | |
#> en postgres ruby | |
apt install libpq-dev | |
gem install pg | |
#> en django python | |
pip install psycopg2-binary | |
# ------------------------------_ | |
#Cuando se actualiza postgres y aparece este tipo de errores | |
``` | |
WARNING: database "reviews_main3" has a collation version mismatch | |
DETAIL: The database was created using collation version 2.38, but the operating system provides version 2.39. | |
HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE reviews_main3 REFRESH COLLATION VERSION, or build PostgreSQL with the right library version. | |
``` | |
sudo -u postgres psql | |
\c reviews_main3 | |
ALTER DATABASE reviews_main3 REFRESH COLLATION VERSION; | |
\q | |
ALTER USER tournament WITH PASSWORD 'dosber/2023';
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CREATE USER heber SUPERUSER;
ALTER USER heber WITH PASSWORD 'heber';