I got this error while importing an osm file to PostgreSQL directly.
My code is:
osm2pgsql –c –d highway -U postgres –P postgres –W postgres -H localhost "D:\data\highway.osm"
The result shows:
ERROR: Connecting to database failed (context=check): connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied
Do I need a style file to fix this error?