How To Connect To PostgreSQL Database And Execute SQL Statement Use Psycopg2 In Python

Psycopg is a popular python postgresql database driver library which provide access to postgresql database server. Use psycopg, you can connect to postgresql database and execute sql statement easily in python source code. This article will tell you how to connect to postgresql database server use psycopg2, it also tell you how to run sql

How To Connect To PostgreSQL Database And Execute SQL Statement Use Psycopg2 In Python Read More »

How To Resolve PSQL: Fatal: Peer Authentication Failed For User “postgres” Error When Login PostgreSQL In Command Line

When I connect to my local PostgreSQL database server with command $ psql postgres ‘postgres’ I encounter the error message psql: FATAL: Peer authentication failed for user “postgres”. :~$ psql postgres ‘postgres’ psql: FATAL: Peer authentication failed for user “postgres” After investigating I finally find the solution to fix this error. This error is because

How To Resolve PSQL: Fatal: Peer Authentication Failed For User “postgres” Error When Login PostgreSQL In Command Line Read More »