Hetzner - DokuWiki

KonsoleH:PostgreSQL/en
(Auto-update from VCS)
 
(Auto-update from VCS)
 
Zeile 7: Zeile 7:
 
<p>PostgreSQL is an object-oriented database management system. It is based on POSTGRES, which was developed at the University of Berkeley. For an overview of all features, please visit the official website http://www.postgresql.org/.</p>
 
<p>PostgreSQL is an object-oriented database management system. It is based on POSTGRES, which was developed at the University of Berkeley. For an overview of all features, please visit the official website http://www.postgresql.org/.</p>
  
<h2>Installing a PostgreSQL database</h2>
+
<h2>Creating a PostgreSQL database</h2>
  
 
<p>On the main page of the MySQL database manager a list of databases is displayed, which shows all databases which currently exist. If you have not yet created any databases, you will only see the maximum number of allowable databases.</p>
 
<p>On the main page of the MySQL database manager a list of databases is displayed, which shows all databases which currently exist. If you have not yet created any databases, you will only see the maximum number of allowable databases.</p>
Zeile 14: Zeile 14:
  
 
<ol>
 
<ol>
<li>Click on 'Add'.</li>
+
<li>Click on <strong>"Add"</strong>.</li>
 
<li>On the following page you will see the recommended (random) access details for your database. If you wish, you can change these. </li>
 
<li>On the following page you will see the recommended (random) access details for your database. If you wish, you can change these. </li>
<li>Click on 'Save' to create the database.</li>
+
<li>Select a name for the database as well as a name for the corresponding database user.</li>
<li>A success message will appear. Click on 'Back' to return to your database list.</li>
+
<li>The  password provides access to the whole database and allows you to create, change or delete any database information, column or row.</li>
 +
<li>(Optional) Require SSL prohibits all unencrypted connections to the database. This can have a negative effect on the accessibility of the database</li>
 +
<li>Click on <strong>Save</strong> to create the database.</li>
 +
<li>A success message will appear. Click on <strong>"MySQL-Databases"</strong> to return to your database list.</li>
 
</ol>
 
</ol>
  
 
<h2>Manage your database(s).</h2>
 
<h2>Manage your database(s).</h2>
  
<p>When you have created a database, two new links appear at the top of the page; 'Change' and 'Delete'.</p>
+
<p>In the overview you have the possibility to create a new database or to modify, delete, backup and access existing databases via phpMyAdmin.</p>
  
<p>Clicking on 'Change' allows you to change the passwords for the database, and 'Delete' removes the database. If you would like to delete a database, konsoleH will require confirmation before finally deleting it. Be careful when you confirm the instruction, as this cannot be reversed.</p>
+
<p>If you wish to delete a database, konsoleH will require confirmation before finally deleting it. Be careful when you confirm the instruction, as this cannot be reversed.</p>
 +
 
 +
<h2>Access your database via SSL</h2>
 +
 
 +
<p>You can access your database in an encrypted manner using SSL. We can provide you with a ready-made certificate that you can use to carry out the encryption. Note: The speed of encrypted connections is slower.</p>
 +
 
 +
<p>The certificate is:</p>
 +
 
 +
<pre>-----BEGIN CERTIFICATE-----
 +
MIIG7jCCBNagAwIBAgIJAOHaB6/9NNBGMA0GCSqGSIb3DQEBBQUAMIGqMQswCQYD
 +
VQQGEwJERTEPMA0GA1UECBMGQmF5ZXJuMRUwEwYDVQQHEwxHdW56ZW5oYXVzZW4x
 +
GjAYBgNVBAoTEUhldHpuZXIgT25saW5lIEFHMRIwEAYDVQQLEwlEYXRhYmFzZXMx
 +
GzAZBgNVBAMTEnNxbC55b3VyLXNlcnZlci5kZTEmMCQGCSqGSIb3DQEJARYXcm9v
 +
dEBzcWwueW91ci1zZXJ2ZXIuZGUwHhcNMTMxMjEwMTMwOTAzWhcNMjMxMjA4MTMw
 +
OTAzWjCBqjELMAkGA1UEBhMCREUxDzANBgNVBAgTBkJheWVybjEVMBMGA1UEBxMM
 +
R3VuemVuaGF1c2VuMRowGAYDVQQKExFIZXR6bmVyIE9ubGluZSBBRzESMBAGA1UE
 +
CxMJRGF0YWJhc2VzMRswGQYDVQQDExJzcWwueW91ci1zZXJ2ZXIuZGUxJjAkBgkq
 +
hkiG9w0BCQEWF3Jvb3RAc3FsLnlvdXItc2VydmVyLmRlMIICIjANBgkqhkiG9w0B
 +
AQEFAAOCAg8AMIICCgKCAgEAq1bzb3Mm4HlRNzf1xI1ssFIvaRjCu/ZpUYhh2Rk8
 +
grexQWJ2ZNZtRqd8UPkIxGgJFuHbbfyf4N1QhC7uI/QqOf5VyPrE0WU75BBIvAhh
 +
MH/xeBxvrrMHF/8yTg5RDS1heJ3Y5UzwSoVHvoNR8fOpcSQ1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azaKtZ5T/ZRyrgsjviLDA52lYeuE7owYmAZ
 +
iA9MNCP9yn/OvfLMG7JQBDbxiZ5JWRnAMbCwWnijGYGiA8sv0i2VmC/nA2d6l7vu
 +
h/30CQfQG/MjPLloAsyyqbSmUqSyjegUAdHXeZhALRuUPQ9Xlp+CU6vqCd/NjTEc
 +
HPFA/rYoL2XKMg+CUX+CGlZiiSOGhELFklaq5SJrjJHATP5cUBYXeHsLZs8fem48
 +
JncyB82AuWdk7jBTKrKE39Nf9hiV+KOLN+smLKVKZ1zOzyLE4x2Yfy7l2MLbDItU
 +
VzdOOTAmxcqBm+iTRwbKO0CaDGsaeUGLMGXSSncSYyXxaXC+Yju2eyk2r9BMNkfB
 +
C+/bzx1MyozSz524JRRkd7TOmCFmWjH+xpWJsBElzdmt3B0d3svcpnZ8XlBuWB2S
 +
V1ZO6Ryr23GeLyio2njVz54xCXUabJ6vt5lyN95Aw2BL8DNxny3lZtl9HqsDW/SK
 +
wpKVWuJoYWnhX1a+SEtYmADX03j0yVXTLI7cnIBcQLINufrIRV4OITP4xbe0CPLO
 +
YL3qKbYlvZjLJBISw1L3ne9xlewzllfPkRwLQPImdhO9wSoe8BWqtpuz13gAXZPG
 +
0Ac=
 +
-----END CERTIFICATE-----</pre>
 +
 
 +
<p>You can save the certificate locally as a text file (for example, as "sqlca.pem"). Once you have done that, you can make an encrypted connection. Unfortunately, however, it is not possible for you to use your own client certificates.</p>
 +
 
 +
<h3>Example commands for encrypted access to PostgreSQL</h3>
 +
 
 +
<ul>
 +
<li>PostgreSQL command line
 +
<ul>
 +
<li><pre>psql "sslmode=require" -h HOSTNAME ... </pre></li>
 +
</ul></li>
 +
</ul>
  
 
<h2>Is there also phpMyAdmin for PostgreSQL?</h2>
 
<h2>Is there also phpMyAdmin for PostgreSQL?</h2>

Aktuelle Version vom 10. Januar 2020, 13:47 Uhr

Inhaltsverzeichnis

Database: PostgreSQL

What is PostgreSQL?

PostgreSQL is an object-oriented database management system. It is based on POSTGRES, which was developed at the University of Berkeley. For an overview of all features, please visit the official website http://www.postgresql.org/.

Creating a PostgreSQL database

On the main page of the MySQL database manager a list of databases is displayed, which shows all databases which currently exist. If you have not yet created any databases, you will only see the maximum number of allowable databases.

How to create a new PostgreSQL database:

  1. Click on "Add".
  2. On the following page you will see the recommended (random) access details for your database. If you wish, you can change these.
  3. Select a name for the database as well as a name for the corresponding database user.
  4. The password provides access to the whole database and allows you to create, change or delete any database information, column or row.
  5. (Optional) Require SSL prohibits all unencrypted connections to the database. This can have a negative effect on the accessibility of the database
  6. Click on Save to create the database.
  7. A success message will appear. Click on "MySQL-Databases" to return to your database list.

Manage your database(s).

In the overview you have the possibility to create a new database or to modify, delete, backup and access existing databases via phpMyAdmin.

If you wish to delete a database, konsoleH will require confirmation before finally deleting it. Be careful when you confirm the instruction, as this cannot be reversed.

Access your database via SSL

You can access your database in an encrypted manner using SSL. We can provide you with a ready-made certificate that you can use to carry out the encryption. Note: The speed of encrypted connections is slower.

The certificate is:

-----BEGIN CERTIFICATE-----
MIIG7jCCBNagAwIBAgIJAOHaB6/9NNBGMA0GCSqGSIb3DQEBBQUAMIGqMQswCQYD
VQQGEwJERTEPMA0GA1UECBMGQmF5ZXJuMRUwEwYDVQQHEwxHdW56ZW5oYXVzZW4x
GjAYBgNVBAoTEUhldHpuZXIgT25saW5lIEFHMRIwEAYDVQQLEwlEYXRhYmFzZXMx
GzAZBgNVBAMTEnNxbC55b3VyLXNlcnZlci5kZTEmMCQGCSqGSIb3DQEJARYXcm9v
dEBzcWwueW91ci1zZXJ2ZXIuZGUwHhcNMTMxMjEwMTMwOTAzWhcNMjMxMjA4MTMw
OTAzWjCBqjELMAkGA1UEBhMCREUxDzANBgNVBAgTBkJheWVybjEVMBMGA1UEBxMM
R3VuemVuaGF1c2VuMRowGAYDVQQKExFIZXR6bmVyIE9ubGluZSBBRzESMBAGA1UE
CxMJRGF0YWJhc2VzMRswGQYDVQQDExJzcWwueW91ci1zZXJ2ZXIuZGUxJjAkBg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ci1zZXJ2ZXIuZGUxJjAkBgkqhkiG9w0BCQEWF3Jv
b3RAc3FsLnlvdXItc2VydmVyLmRlggkA4doHr/000EYwDAYDVR0TBAUwAwEB/zAN
BgkqhkiG9w0BAQUFAAOCAgEAkXyr2ndDBJ+XN7Vy5K9Xc198eqkE2xXPGgsCy9EK
r3bskuC1cAdFWyR/0ZXRUp3yXAMj6azaKtZ5T/ZRyrgsjviLDA52lYeuE7owYmAZ
iA9MNCP9yn/OvfLMG7JQBDbxiZ5JWRnAMbCwWnijGYGiA8sv0i2VmC/nA2d6l7vu
h/30CQfQG/MjPLloAsyyqbSmUqSyjegUAdHXeZhALRuUPQ9Xlp+CU6vqCd/NjTEc
HPFA/rYoL2XKMg+CUX+CGlZiiSOGhELFklaq5SJrjJHATP5cUBYXeHsLZs8fem48
JncyB82AuWdk7jBTKrKE39Nf9hiV+KOLN+smLKVKZ1zOzyLE4x2Yfy7l2MLbDItU
VzdOOTAmxcqBm+iTRwbKO0CaDGsaeUGLMGXSSncSYyXxaXC+Yju2eyk2r9BMNkfB
C+/bzx1MyozSz524JRRkd7TOmCFmWjH+xpWJsBElzdmt3B0d3svcpnZ8XlBuWB2S
V1ZO6Ryr23GeLyio2njVz54xCXUabJ6vt5lyN95Aw2BL8DNxny3lZtl9HqsDW/SK
wpKVWuJoYWnhX1a+SEtYmADX03j0yVXTLI7cnIBcQLINufrIRV4OITP4xbe0CPLO
YL3qKbYlvZjLJBISw1L3ne9xlewzllfPkRwLQPImdhO9wSoe8BWqtpuz13gAXZPG
0Ac=
-----END CERTIFICATE-----

You can save the certificate locally as a text file (for example, as "sqlca.pem"). Once you have done that, you can make an encrypted connection. Unfortunately, however, it is not possible for you to use your own client certificates.

Example commands for encrypted access to PostgreSQL

  • PostgreSQL command line
    • psql "sslmode=require" -h HOSTNAME ... 

Is there also phpMyAdmin for PostgreSQL?

phpMyAdmin is written for MySQL and does not support PostgreSQL. There is a web-based application for PostgreSQL, however, which is very similar to phpMyAdmin. This can be downloaded at http://phppgadmin.sourceforge.net/. Install the tool on your account and follow the operating instructions to manage your PostgreSQL databases.



© 2020. Hetzner Online GmbH. Alle Rechte vorbehalten.