PostgreSQL management tool phpPgAdmin Getting Started Guide

Source: Internet
Author: User


1. Install phpPgAdmin
Decompress the downloaded package

Run the following command for tar.gz:

Copy codeThe Code is as follows: gunzip phpPgAdmin-* .tar.gz
Tar-xvf phpPgAdmin-*. tar

Run the following command for tar.bz2:

Copy codeThe Code is as follows: bunzip2 phpPgAdmin-* .tar.bz2
Tar-xvf phpPgAdmin-*. tar

Run the following command for. zip:

Copy codeThe Code is as follows: unzip phpPgAdmin-*. zip

2. Configure phpPgAdmin

Edit the phpPgAdmin/conf/config. inc. php file

If you mess up the configuration file, you can use the config. inc. php-dist file to restore it.

3. Create a reports database

If you want to enable reports (a useful feature), go to the 'SQL' subdirectory to view the reports-pgsql. SQL script.
It provides guidance on how to create a reports database.

Iv. Dump Functions

If you are running PHP in safe mode, in order to make the database dump work properly,
You must include the 'safe _ mode_allowed_env_vars' command in php. ini in the PGPASSWORD and PGUSER environment variables,
You also need to include the directory where the pg_dump binary file is located in the 'safe _ mode_exec_dir 'command.
For example:

postgresql  ui
Copy codeThe Code is as follows: safe_mode_allowed_env_vars = PHP _, PG
Safe_mode_exec_dir =/usr/bin

Generally, you do not want all programs in/usr/bin to be executed,
Therefore, you may need to copy pg_dump and pg_dumpall to a separate directory.

Similarly, if you want phpPgAdmin to support dump,
You also need to ensure that pg_dump and pg_dumpall can be executed by processes running PHP.

Finally, if you run phpPgAdmin in safe mode,
Import, export, and transaction processing that require long running may exit due to timeout.

V. PostgreSQL statistics collector

If you have enabled the PostgreSQL statistics program (statistics collector ),
PhpPgAdmin displays the performance and usage statistics of tables and indexes.
To enable this function, You Need To uncomment the following lines in the postgresql. conf file:
Copy codeThe Code is as follows:
Stats_start_collector = true
Stats_command_string = true
Stats_block_level = true
Stats_row_level = true

pgbouncer in postgresql
Vi. cookies

To be able to use phpPgAdmin in a browser normally, you must enable the cookies function of the browser.

VII. Important-security-related

PostgreSQL does not require a password to log on by default, postgresql synchronous_commit
We strongly recommend that you configure the md5 password for the local link in pg_cmd.conf,
Set a password for the default Super User.

phppgadmin postgresql 11

Because a large number of installed phpPgAdmin instances do not set a password for the local connection,
We provide a configuration option named 'extra _ login_security ', which defaults to TRUE.
This means you cannot use the 'root', 'admin', 'pgsql', or 'ipvs' user or empty password to log on.

postgresql tutorial pdf

You can set 'extra _ login_security 'to fasle only after you have made sufficient security settings for the database,
In this way, you can use the administrator password to log on as an administrator.

postgresql varchar or text

8. Tips

When display_errors = On is set in php. ini and error_reporting contains errors other than ERROR,

postgresql update inner join
PhpPgAdmin often cannot be used smoothly, probably because the encoding does not strictly abide by the encoding style that PHP developers expect.
If some problems occur, try display_errors = Off to solve some annoying problems.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.