ubuntu server guide
Let’s verify the database’s creation: $ sudo docker exec -ti my-database su postgres --command "psql my_db --command 'SELECT * FROM pg_database WHERE datistemplate = false;'" oid | datname | datdba Docker container that will automatically run .sql (or .sql.gz or .sql.xz) and .sh files through the psql interpreter during initialization, in POSIX alphanumerical order. In our case we have a single .sql restart) because it’ll attempt to re-attach and may appear successful at first glance: ... postgres_1 | psql:/docker-entrypoint-initdb.d/my-color-database.sql:10: ERROR: type "sometypo" does not exist postgres_10 码力 | 486 页 | 3.33 MB | 1 年前3Ubuntu Server Guide 18.04
database: 8 http://www.postgresql.org/docs/current/static/admin.html 237 Databases sudo -u postgres psql template1 The above command connects to PostgreSQL database template1 as user postgres. Once you to the PostgreSQL server, you will be at a SQL prompt. You can run the following SQL command at the psql prompt to configure the password for the user postgres. ALTER USER postgres with encrypted password connections from other machines by using the PostgreSQL client. sudo apt install postgresql-client psql -h postgres.example.com -U postgres -W Replace the domain name with your actual server domain name0 码力 | 413 页 | 1.40 MB | 1 年前3
共 2 条
- 1