PostgreSQL installation note

Source: Internet
Author: User

I recently tried PostgreSQL, a free database software, and encountered some obstacles. The system is windows.

I. VC ++ runtime error during installation

The installation version is the latest 9.2.3.1, and the Windows 7 system on the local machine is normal. If you want to install the version on the server, this error occurs. The server is win2003, and you have found many ways on the Internet, the final solution is to add a running parameter, that is, run cmd, run the installer in this mode, followed by the parameter "-- install_runtimes 0 ". The real reason is not clear yet, but the installation wizard comes out.

2. Remember the Postgres password of the default system user

One step in the installation is to prompt the System user to set the Postgres password, because it was not very clear at the beginning, and then I forgot what I set. After the installation is complete, use the pgadmin tool for management. In this case, find the pg_mirror.conf file in the data folder under the installation location, open it in notepad, find the line: Host All 127.0.0.1/32 MD5, and change MD5 to trust, in this way, you can use the trusted connection without password verification, but I tried to reset the password using the alter USER command. Although the prompt is successful, once it is changed to MD5, it will always fail, and there is no way to re-install it.

3. Allow Remote Access

PostgreSQL supports multiple authentication methods, but it may still use a password for verification. By default, only local access is allowed. You can find the row of the file mentioned above and change 127.0.0.1/32 to the IP address of the remote computer that can be accessed. If it is changed to 0.0.0.0/0, no restrictions are imposed.

4. Create a tablespace

The tablespace name indicates the disk location where data is stored. in windows, a folder is specified. You must add security control permissions for the network service to the folder before creating the folder. Otherwise, the folder will fail. PostgreSQL will default the network service user during installation. You can find this in the service.

V. Management Tool pgadmin

This tool is installed by default when you install the database. If you only want to install the tool on your computer, you need to download an independent installation package for installation.

Vi.. net connection component

Since the database is free of charge, it is recommended that you do not need any money for related tools ,. net is recommended for npgsql, you can download the appropriate version from the official website, reference the corresponding DLL in the project, the usage is the same as other ADO.

After solving these problems, we can finally use it normally. In general, the installation and deployment of PostgreSQL is relatively simple, and the next step is to gradually break through. I plan to try it for a while and move the value of some small projects, check whether it works together.

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.