![]() ![]() Now try to connect to server using password: psql -h 127.0.0.1 -U postgresīy default, PostgreSQL server listens only for local client connections. Before that, we need to run the following command to set password for postgres superuser: sudo -u postgres psql -c "ALTER USER postgres with password 'pwd123' " Peer authentication retrieves the client's OS username and compares it with the allowed database username.Ī postgres superuser also can connect by providing a password. By default, postgres superuser doesn't have password and use peer authentication which only supported on local connections. Sudo service postgresql restart Configuring PostgreSQLĭuring PostgreSQL installation, a postgres superuser has been created. We can also stop, start and restart the service: sudo service postgresql stop ![]() The following command can be used to check if PostgreSQL service is running: sudo service postgresql status When installation is completed, we can check PostgreSQL server version: pg_config -version Run the following command to install PostgreSQL 14: sudo apt install -y postgresql-14 Update the package lists: sudo apt update Install PostgreSQLĭownload GPG key: sudo wget -qO /etc/apt//pgdg.asc Īdd repository: echo "deb $(lsb_release -sc)-pgdg main" | sudo tee /etc/apt//pgdg.list This tutorial shows how to install PostgreSQL 14 on Ubuntu 20.04. PostgreSQL is an open-source project that available under the PostgreSQL License. ![]() PostgreSQL is a cross-platform relational database that allows to access data using SQL language. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |