问题:忘了PostgreSQL数据库的密码应该如何解决? 解决方法: 首先打开data目录下的pg_hba.conf配置文件,找到: # IPv4 local connections: host all all 127.0.0.1/32 md5 然后把md5改成trust,重新启动。 psql -d template1 -U postgres -c "alter role postgres password ‘123456’;" 注:此时trust是否改回来都无足轻重了。(责任编辑:卢兆林)[@more@]http://tech.ccidnet.com/art/5833/20080306/1383083_1.html
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/93029/viewspace-1026569/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/93029/viewspace-1026569/