How to enter adminer without password? [closed] - adminer

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 10 months ago.
Improve this question
Using adminer-4.7.2-mysql.php on my home laptop with Kubuntu 18 is there is a way
to login to it without password entering? Or session time as long as possible ?
Thanks!

Adminer doesn't allow connection without password for security reasons.
If you want to login without password because you're working in local environment you must use the login-password-less plugin.
1. Install adminer default core file
Download the adminer core file PHP:
wget https://github.com/vrana/adminer/releases/download/v4.7.5/adminer-4.7.5.php
Then rename it to adminer_core.php:
mv adminer-4.7.5.php adminer_core.php
Access to this adminer file from web browser and test login without password.
You can see the error message from Adminer by default:
2. Install plugins
To use plugins with Adminer you need to install the plugin autoloader file:
mkdir plugins
cd plugins
wget https://raw.githubusercontent.com/vrana/adminer/master/plugins/plugin.php
Then install the login password less plugin into plugins directory:
wget https://raw.githubusercontent.com/vrana/adminer/master/plugins/login-password-less.php
3 Configure your Adminer password
Last step is to define a password that will not be use for MySQL connection but only for Adminer authentification:
nano adminer.php
In this file copy/paste the following code and replace YOUR_PASSWORD_HERE by any password you want:
<?php
function adminer_object() {
include_once "./plugins/plugin.php";
include_once "./plugins/login-password-less.php";
return new AdminerPlugin(array(
// TODO: inline the result of password_hash() so that the password is not visible in source codes
new AdminerLoginPasswordLess(password_hash("YOUR_PASSWORD_HERE", PASSWORD_DEFAULT)),
));
}
include "./adminer_core.php";
4. That's it!
Now you can access to http://localhost/adminer.php and authenticate yourself with the previous password you have set in adminer.php.
In resuming you have the following architecture:
└ localhost
├ adminer.php
├ adminer_core.php
└ plugins
├ login-without-password.php
├ plugin.php
Enjoy! ☺☼♪♫

If anyone is still looking for a quick workaround for this please follow the below instructions.
Open the downloaded adminer.php file in any text editor.
Use the find command to find the login method it will kinda look like this one.Login($ye,$F){if($F =="") return
Type anything between "" double quotes like "abc" and save the file.
That's it problem Solved. You can now login to adminer without a password.

If you want to login without a password because you're working in the local environment
Install the latest admirer https://github.com/vrana/adminer
Open file adminer.php
Search and change from login($ze,$F){if($F=="")return to login($ze,$F){if(1==1)
type root in field username and click login
Now you can access adminer without a password

I tried above methods but did not work for me so I did the following which works in 2021 for Adminer 4.7.9.
WARNING: Please note that its only for your local machine & not advised for online databases.:
Step-1: Download Adminer source from Github, this link.
Step-2: Open adminer-master\adminer\include\auth.inc.php
Step-3: Edit the following at lines 55 to 57 & replace my_username & my_password with your MySQL credentials:
$server = "localhost"; //$auth["server"];
$username = "my_username"; //$auth["username"];
$password = "my_password"; //(string) $auth["password"];
Step-4: Save & now open Adminer by pointing your browser to "adminer-master\adminer"
Step-5: Just click Login button & you will login without entering anything.

/*******************************************************
** Adminer, since version 4.7.0 does not accept *
** connections without a password. *
** For version 4.7.x to accept an empty password, *
** in the adminer-4.7.x.php file, replace : *
** login($Ae,$F){if($F=="") by login($Ae,$F){if(1===2) *
** This can be done automatically by replacing false *
** with true in the line below. *
*******************************************************/
$AcceptEmptyPassword = true;

Related

ActiveCollab - Forgot admin password - cannot reset through phpmyadmin

I am unable to reset the owner password for ActiveCollab v5.
Emails are not configured, so forgot password option is useless.
I have access to PHPMyAdmin, but am unable to reset the password.
Any help is appreciated.
Setting password directly in the database is not recommended. Instead, there's a command in ActiveCollab's command line utility that lets you set user's password. Navigate your terminal to a directory where ActiveCollab is installed and run:
php tasks/activecollab-cli.php user:set_password you#your-company.com
System will prompt you for a new password and set it.
If ActiveCollab's CLI tool complains that user:set_password command is not present, you are using an older version of ActiveCollab, and you should upgrade first. This can be done through command line as well. Here's the help article that goes into more details:
https://activecollab.com/help/books/self-hosted/upgrade

Can not login to Postgres DB as new user

I have installed Foreman via foreman-installer (that pack included Postgres DB 9.5). Now i want to create new user + new database for Zabbix, however it seems that i am doing something wrong. The image shows what commands i typed. The new user is created succesfully but i can't login as it to database. Could someone help me and explain where is the problem?
EDIT: I've added option that was suggested in another thread (WITH LOGIN) but it didn't help me:
I believe the answer is here.
In summary, "peer authentication" means postgres checked the username of the UNIX user (which is not zabbix), and ignored your -U option. Instead, you want to use "password authentication", which you can configure in your pg_hba.conf file. Check the link for instructions how to do that.

Failed to load sql modules into the database cluster during PostgreSQL Installation

I have attempted to install PostgreSQL 9.4 and 8.4 multiple times and it is failing no matter what I have tried. I am attempting to install on Windows 7 SP1 x64. After each failed install I have uninstalled and deleted the installation folder to start fresh.
Each time I attempt the install I get an error pop up near the end of installation that says:
"failed to load sql modules into the database cluster".
Then another error pop up displays immediately after that says:
"Error running post install step. Installation may not complete correctly. Error reading C:/Program Files/PostgreSQL/9.4/postgresql.conf"
I have attempted installation with the following actions:
Always installed as administrator
Turned off all virus protection and windows firewall
Changed the installation directory to something other than the Program Files directory.
Changed the data directory to something other than the installation directory of postgres
None of the actions above have helped and I always receive the error. Any help that someone can provide would be greatly appreciated!
Encountered a very similar problem that OP is reporting today while installing Postgres 9.4.
It turns out that the password generator I was using has made a password that contains non-alphanumeric characters. ("^") I believe was the culprit in this case. Removing that allowed the installation of Postgres 9.4 (Windows 64 bit) to complete.
Very easy fix once you've found it, but the error message that comes up is not descriptive, so in this case I didn't notice at first what I was doing wrong.
I was getting this same error when trying to install PostgreSQL v9.4.4 on Windows 10 Pro. Starting with a solution hosted on Stack Exchange, I came up with the following steps that allowed the installer to run successfully:
1) Create a new user account, called postgres
2) Add the new account to the Administrators and Power Users groups
3) Restart the computer
NOTE: I added step #3, since step #4 didn't work without it
4) Run a command prompt as the postgres user, using the command:
runas /user:postgres cmd.exe
5) Run the installer from the postgres command window
6) Delete the postgres user account, as well as the user directory
NOTE: I added step #6, since the postgres account is not required after installation
What worked for me is, during the install, specifying a Postgre SQL data folder that's outside of any Windows user profile directory (C:\Users), such as C:\postgres-data.
My setup:
Win 10 Pro
PostgreSQL 9.5 RC1
I ran into this issue when I tried setting PostgreSQL's data directory somewhere under my user profile's directory, such us somewhere under "My Documents".
I tried Jeff G's solution and it didn't work at first. It worked only when I kept the data directory as the default (C:\Program Files\PostgreSQL\9.5\data). So then I tested further and tried setting the data directory to somewhere outside of any user profile directories (i.e. somewhere that isn't under C:\Users). For example, C:\postgres-data and this worked.
I then just tried using that directory with my default user, and not bothering with the postgres temp user as outlined in Jeff G's solution and that also worked. So in the end, it had to do with my data directory being somewhere under C:\Users. As long as it was outside of that, it worked.
None of these answers here helped me, finally I solved this problem by creating the folder before the installation (C:\PostgreSQL\data) and giving it full access for the group "Users".
Windows 7 x64, postgresql-9.5.2-1-windows-x64
Hope It's Work.
1.)Uninstall PostgreSQL
2.)Delete the postgres user if it still exists :
net user postgres /delete
3.) Create the postgres user with a password you can remember:
net user /add postgres
4.) Add the postgres user to the Administrators group:
net localgroup administrators postgres /add
5.) Add the postgres user to the Power Users group
net localgroup "power users" postgres /add
6.) Run a command window as the postgres user:
runas /user:postgres cmd.exe
7.) Change user postgres and install postgresql
8.)Back your and remove the postgres user from the Administrators group.
net localgroup administrators postgres /delete
I had the same error ("Failed to load SQL modules into the database cluster.") when installing on W2K12R2 using the EnterpriseDB installer linked to from the PostgreSQL Windows download page. I tried running the installer with admin privs, and using the postgres-user solution offered by Jeff G, but neither worked. Finally I tried the second installer, BigSQL, and that installed without issue.
When installing PostgreSQL, do not use the following symbols in your database's admin password: %, <, and >.
Bug report and problem solution here
Changed the data directory to something other than the installation directory of postgres
Make sure NETWORK SERVICE has read/write permissions on that folder, the installation was failing for me until I did this.
I had this issue too with 9.5 and got around it by:
Installing with the default data folder.
Making sure my new data folder had full control access for the "NETWORK SERVICE" account.
Then changing the default PGDATA folder as per this instruction: https://wiki.postgresql.org/wiki/Change_the_default_PGDATA_directory_on_Windows
I had the same problem, and noticed that some Postgres .bat files were opening in a text editor. Text editors opening files during installation isn't too uncommon, but I noticed these batch files were setting directory permissions. I then found that .bat files were set to open in a text editor (Notepad++) by default. I changed the default program for .bat files, uninstalled Postgres, re-ran the installer, and it worked perfectly. Hope this helps.
I had the same problem before. I solved this by installing Visual Studio C++ Express first.
I had the same experience as #gomisha. #Jeff G's solution did not work for me no matter which user ran the installer.
As long as the target data directory was anywhere under c:\users, the install or database cluster init would fail.
I was successful after creating c:\postgresql-data and ensuring that the postgres user had full access in the 'effective access' tool.
Note: I did not use control userpasswords2 to set up the postgres user; I did it through the traditional crappy Windows 10 user wizard that tries to make the user sign up for hotmail. I did run the install as postgres.
I was getting this issue with the BigSQL windows installer PostgreSQL-9.6.5-1-win64-bigsql.exe
The problem turned out to be that my system path was too long. After removing some uncessary junk from my System Path, and then reinstalling, the problem was gone.
One of the answers here is the only thing that worked on my machine:
I had the same error message when trying to install 9.2.4. My issue
was because even though the Win2k8 server had %SYSTEMROOT%\system32 as
part of the path, no programs could "see" anything in
C:\Windows\system32. The installer heavily uses icacls.exe during the
init routine. Since my path was screwed up, the installer bombed out.
Once I explicitly added C:\Windows\system32 to the SYSTEM's Path
environment variable and re-ran the installer as an admin, everything
worked fine.
Credits to the user.
Go to services.msc
Search for postgres service
Go to Log On tab
Select local account
Profit
The alternative solution for problems with PostgreSQL installer is setting this up with a Docker.
Install Docker Desktop
https://www.docker.com/products/docker-desktop/
Start installed Docker Desktop
In PowerShell, run:
docker pull postgres
In PowerShell, run:
docker run -d -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=mypassword postgres
Now you can connect to the Postgres server for example with pgAdmin on the same machine, using:
host: localhost
port: 5432
maintenance database: postgres
username: postgres
password: mypassword
I think this would be better as individual comments above, but I don't have the required rep. I just spent days on this, with Postgres 10 on Win 10 Creators. My "answer" was to let Postgres put the data in its default install folder instead of my User folder (where it would be automatically backed-up).
1. This problem can happen with no reported install errors at all. On my very first try, I saw:
Failed to load SQL modules into the database cluster.
But that seemed to be due to:
Executing C:\Users\loren\AppData\Local\Temp\postgresql_installer_aee8e5a76f\vcredist_x64.exe /passive /norestart
Script exit code: 3010
MSI (s) (AC:FC) [14:21:35:341]: Product: Microsoft Visual C++ 2013 x86 Minimum Runtime - 12.0.40660.
Restart required. The installation or update for the product required a restart for all changes to take effect.
The restart was deferred to a later time.
Restarting Windows after the failure of the rest of the Postgres installation did not let Postgres run.
Once VC was in place, uninstalling and re-installing Postgres (still with its data in my User folder) completed with no reported errors. But every attempt to access it, by any means, still resulted in something like this:
C:\Program Files\PostgreSQL\10\bin>psql
psql: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
The RawCap sniffer showed TCP SYN followed immediately by RST,ACK on localhost for both v4 and v6 for each try. Netstat did not see port 5432 in use at all. All Postgres runtime logs were totally empty. In Windows Services, I could manually start the postgresql-x64-10 service, but it immediately stopped itself, with the note that some services do that normally.
2. I tried moving the data directory via the Postgres wiki procedure. Apparently for Postgres 10 it is incomplete. It does not deal with:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-10\Data Directory
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Services\postgresql-x64-10\Data Directory
C:\Program Files\PostgreSQL\10\pg_env.bat
C:\Program Files\PostgreSQL\10\scripts\serverctl.vbs
But fixing every data file instance I could find did not let it run. And even after fixing all those, and uninstalling and re-installing again with the default location, the new pgAdmin4 somehow still remembered my original User data directory location!
3. I did not try giving NETWORK SERVICE read/write permissions on my User folder. Once the default install worked I wanted to get on with my original project... Maybe that would have worked.

Can't connect to PostgreSQL in Windows Server [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I'm trying to upgrade my version of PostgreSQL to 9.2 on a Windows Server OS and I keep getting the following error:
An error has occurred:
Error connecting to the server: FATAL: password authentication failed for user "postgres"
How do I make it not do this and actually connect like it is supposed to? I'm using the exact same password from my older installation.
Running the installer via EnterpriseDB prompts you for a password during the initial setup - This password is the postgres users password:
If you do not remember the password, or if you typed it incorrectly during the install(twice!) try these steps:
edit pg_hba.conf to allow trust authorization temporarily
Reload the config file (pg_ctl reload)
Connect and issue ALTER ROLE / PASSWORD to set the new password
edit pg_hba.conf again and restore the previous settings
Reload the config file again
The files will be located in C:\Program Files\PostgreSQL\9.2\data if you installed to the default path.
You can reload the configuration via PhAdmin III by right clicking on the server name and choosing reload configuration or use pg_ctl reload. Barring that restart the service or reboot.

postgresql installation failed

I tried to install postgresql 8.4 in my windows 7 (64 bit). But it fails with following messages in log
Initialising the database cluster (this may take a few minutes)...
Executing cscript //NoLogo "C:\PostgreSQL\8.4/installer/server/initcluster.vbs" "postgres" "postgres" "****" "C:\PostgreSQL\8.4" "C:\PostgreSQL\data" 5432 "DEFAULT"
Script exit code: 1
Script output:
CScript Error: Can't find script engine "VBScript" for script "C:\PostgreSQL\8.4\installer\server\initcluster.vbs".
Script stderr:
Program ended with an error exit code
Error running cscript //NoLogo "C:\PostgreSQL\8.4/installer/server/initcluster.vbs" "postgres" "postgres" "****" "C:\PostgreSQL\8.4" "C:\PostgreSQL\data" 5432 "DEFAULT" : Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
The database cluster initialisation failed.
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
I have googled about this and run the command 'regsvr32 vbscript.dll' and it shows the message 'DllRegisterServer in vbscript.dll is succeeded', but it haven't solved my issue.
Also I set the default value for {B54F3741-5B07-11cf-A4B0-00AA004A55E8} in registry to the file path of vbscript.dll, but it also haven't solved my issue.
How to fix this issue?
Following link solve my issue
http://www.geekscribes.net/blog/2009/04/22/postgresql-database-cluster-initialisation-failed-solution/
The article text:
I’ll keep this one short and sweet. For those of you that have tried
to install PostgreSQL (mine was 8.3.7-1) on Windows Vista and got the
error Database Cluster Initialisation Failed error at the end of the
install, read this.
The problem is that Vista has some safety features associated with
setting permissions on the Program Files folder. Basically, even if
you are an admin, you can’t change permissions on some folders like
Program Files and Windows folder itself. This causes initdb to be
unable to create some folders and the database cluster. What this
means for you is that you need to install PostgreSQL in another folder
that is not inside Program Files.
By the way, if you have forgotten your Postgres account password while
installing the first time, just open a Command Prompt in Vista (If you
don’t know how, Google for it). Then type the command “net user”. You
will see a list of users on your computer. Find Postgre’s account.
It’s usually “postgres“. Then you need to change its password by
typing “net user postgres new_password” where new_password is… well, a
new password for the account. You will be needing that postgres
account during install. You will need admin privileges to do this
change however.
Firstly, uninstall any failed installations. Use the Control Panel or
the PostgreSQL installer in the install folder.
During the install, you will be prompted to choose where you want to
install the program. Just select a location in another place. Like
“C:\PostgreSQL” or something similar. It may even be on your desktop.
But not inside Program Files. Not inside Windows folder. However, it’s
not as easy. Bear with me.
After the install, you will still see that darned error message (or
something like non-fatal error occured). Do not despair! (For Windows
Power Users, we are just assigning Full Control permission to Postgres
account on the new PostgreSQL install folder). For other users, read
on if you don’t know how to do it.
Go to where you just installed PostgreSQL. In this case, the C:
drive. There, right-click on the folder (usually called PostgreSQL),
and go to Properties – Security tab. Click on the Edit button. You
will now see some usernames and other stuff. Click on the Add button.
In the “Enter the object names to select” box, enter “postgres” and
press Check. Postgres’ user account should appear there. Click on Ok.
Now from the “Group or Usernames” box, select the Postgres account. In
the window below, with lots of checkboxes, assign permission “Full
Control” in the Allow Column to it. Note, if you don’t want to allow
full control, just give it read/write. But I just went ahead and gave
it Full Control. (I was tired and annoyed. The “World’s most advanced
open source database” had failed to install!). Click on Ok and wait a
bit for permissions to be applied.
Then, just do a re-install. Do not uninstall anything. Just run the
setup again. It’ll say that a PostgreSQL install folder already exists
and other stuff. Just click on Next until the install finishes. If you
see “file cannot be copied” errors, click on the “ignore” button when
needed.
That’s it. PostgreSQL should be up and running on Vista now. Hope it
works for you too as it did for me, and that my guide is helpful to
anybody. If it works, or if you have other solutions, let us know.
Thanks for reading! :)
I got the same result installing "postgresql-9.2.3-1-windows-x64.exe" on Windows 7 Enterprise
and the problem get solved when I change the installation path.
Try to install into "c:\postgresql" instead of "c:\program files\Postgresql"
Good luck
For me the problem was that PATH variable did not have C:\Windows\system32 and so it did not find ICACLS command to change folder permissions. So the solution is to add C:\Windows\system32 to system PATH variable (if it does not contain it already):
Control Panel -> System -> Advanced System Settings -> Advanced -> Environment Variables
Under "System variable" find and select "Path"
Click "Edit..."
Now if value does not contain path to system32 append string ;C:\Windows\system32 (or wherever your windows path is)
I've pulled shin's link from the google cache:
Original link:
http://www.geekscribes.net/blog/2009/04/22/postgresql-database-cluster-initialisation-failed-solution/
Cached link:
http://webcache.googleusercontent.com/search?q=cache:RXu-5-ZzfcgJ:www.geekscribes.net/blog/2009/04/22/postgresql-database-cluster-initialisation-failed-solution/+&cd=3&hl=ro&ct=clnk
PostgreSQL Database Cluster Initialisation Failed Solution
I’ll keep this one short and sweet. For those of you that have tried to install PostgreSQL (mine was 8.3.7-1) on Windows Vista and got the error Database Cluster Initialisation Failed error at the end of the install, read this.
The problem is that Vista has some safety features associated with setting permissions on the Program Files folder. Basically, even if you are an admin, you can’t change permissions on some folders like Program Files and Windows folder itself. This causes initdb to be unable to create some folders and the database cluster. What this means for you is that you need to install PostgreSQL in another folder that is not inside Program Files.
By the way, if you have forgotten your Postgres account password while installing the first time, just open a Command Prompt in Vista (If you don’t know how, Google for it). Then type the command “net user”. You will see a list of users on your computer. Find Postgre’s account. It’s usually “postgres“. Then you need to change its password by typing “net user postgres new_password” where new_password is… well, a new password for the account. You will be needing that postgres account during install. You will need admin privileges to do this change however.
Firstly, uninstall any failed installations. Use the Control Panel or the PostgreSQL installer in the install folder.
During the install, you will be prompted to choose where you want to install the program. Just select a location in another place. Like “C:\PostgreSQL” or something similar. It may even be on your desktop. But not inside Program Files. Not inside Windows folder. However, it’s not as easy. Bear with me.
After the install, you will still see that darned error message (or something like non-fatal error occured). Do not despair! (For Windows Power Users, we are just assigning Full Control permission to Postgres account on the new PostgreSQL install folder). For other users, read on if you don’t know how to do it.
Go to where you just installed PostgreSQL. In this case, the C: drive. There, right-click on the folder (usually called PostgreSQL), and go to Properties – Security tab. Click on the Edit button. You will now see some usernames and other stuff. Click on the Add button. In the “Enter the object names to select” box, enter “postgres” and press Check. Postgres’ user account should appear there. Click on Ok.
Now from the “Group or Usernames” box, select the Postgres account. In the window below, with lots of checkboxes, assign permission “Full Control” in the Allow Column to it. Note, if you don’t want to allow full control, just give it read/write. But I just went ahead and gave it Full Control. (I was tired and annoyed. The “World’s most advanced open source database” had failed to install!). Click on Ok and wait a bit for permissions to be applied.
Then, just do a re-install. Do not uninstall anything. Just run the setup again. It’ll say that a PostgreSQL install folder already exists and other stuff. Just click on Next until the install finishes. If you see “file cannot be copied” errors, click on the “ignore” button when needed.
That’s it. PostgreSQL should be up and running on Vista now. Hope it works for you too as it did for me, and that my guide is helpful to anybody. If it works, or if you have other solutions, let us know. Thanks for reading!
Solution:
• Uninstall PostgreSQL
• Run command: net user postgres /delete
• Click: Control Panel -> User Accounts -> Configure advanced user profile properties -> delete all “Unknown User” instances that seem to be left from PostgreSQL installation.
• Run: compmgmt.msc -> Click Local Users and Groups -> Users -> New User… -> User name: postgres, Password: postgrespass -> Create
• Run: compmgmt.msc -> Click Local Users and Groups -> Users -> postgres ->Member of -> Add… -> Administrators -> OK
• copy the PostgreSQL installer postgresql-8.4.9-1-windows.exe to C:\
• Run: runas /user:postgres cmd.exe -> cd \ -> postgresql-8.4.9-1-windows.exe -> installed successfully without errors. Checked data folder and confirmed files created successfully.
• Run: compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Administrators -> Remove
• Run: compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Add… -> Power Users -> OK
Your Windows install is a little borked, and you will need to re-register the VBScript engine to get the installer to run.
Edit: I'm blind, the post author had already tried this.
See:
http://wiki.postgresql.org/wiki/Running_%26_Installing_PostgreSQL_On_Native_Windows#The_installer_exits_with_a_runtime_installation_error.3F
I had the same problem when trying to install PostgreSQL 9.3.5-3 on a Windows 7 x64 machine (not joined to a domain) in a folder, created on the root, with full access to everybody. The problem was solved by not using ä in my password, so avoid using non-English characters in your password.
This message still occurs in Postgres v9.3.1.1.
For me, the problem was running the installer under the "Administrator" account. This doesn't work. Run it under an administrator account, avoiding the built-in "Administrator" account.
I don't really know what it's usually called, but it's the one that already exists on a fresh install; the one that cannot be changed to a Standard User; the one whose profile is stored in C:\Users\Administrator. Turns out it was a bad idea using this account; learned it the hard way.
(Windows Server 2008 R2 64-bit)
Hey guys the answer is very simple just install postgresql on another folder outside program files. it prompts a non fatal error and proceeds to with the installation...
I have solved the same problem on Windows Server 2003 and postgres 9.2.9-3 by creating directory for installation beforehand, and giving full access on it to group "Users".
The answer is very simple, move the downloaded .exe file to some other folder . for ex: c:\postgres and try to install it.
your issue is due to some admin privilege issues
There seem to be many reasons cause the installation fail.
In my case, I'm using Windows 10 home edition, which has no advance user group control,
so a lot of solutions above doesn't work for me. And I guess this is why the installation fails.
What I do is just using BigSQL's installer instead of EnterpriceDB's installer,
Choose the second installer in posgresql download center
Or visit BigSQL directly.
After some struggle I came across this post. I struggled some more time and I think I finally figured it out with the help of all the invaluable input from my predecessors in this post.
My case
It's November 2018.
PostgreSQL 11.1 Winodws-x64 from EnterpriseDB as suggested by postgresql.org
Tried to install on Windows 10 (both Home and Professional)
I tried several constellations and boiled down the process to this:
Pre-installation
Uninstall any failed installations.
Add a local user "postgres" (lowercase worked for me) to your computer, assign a SIMPLE password and administrative rights. Do avoid special characters at all expenses, stick with english letters (upper and lowercase) and numbers only.
Add a folder on your computer OUTSIDE the "C:\Program Files" or Windows folder. I chose C:\PostgreSQL
Assign full control over the above folder to the postgres account.
Installation
Run the installer (postgresql-11.1-1-windows-x64.exe in my case)
use the above password and folder when prompted (not the default folder)
Post-installation
For security reasons you should now assign a proper password to the windows-user "postgres" and remove administrative rights from the account.
Test your installation by running pgAdmin and connecting to your server. However, the password for the postgres user you need to connect to the server will still be the simple one you used earlier. You may change it within pgAdmin by selecting the postgres database left, choose Tools -> Query Tool and type ALTER USER postgres WITH PASSWORD '4wligzo748o$%&'; or whatever. Execute with the flash symbol or F5.
But maybe this is wrong altogether and you should rather run a linux vm with postgreSQL server.
Struggling with this problem for days. Finally got help from the EDB team
My problem got solved by doing the following steps :
1) Open the command prompt and go to the following directory:
cd "C:\Program Files\PostgreSQL\10\bin"
2) Once you are inside this "C:\Program Files\PostgreSQL\10\bin" directory execute the following command:
.\initdb.exe -D "C:\Program Files\PostgreSQL\10\data"
3) At the end of this command you will be promoted to execute a pg_ctl command to start the Postgres cluster. Please execute the command and once you get a message as the server started you are all set to use the Postgres database.
Note: Instead of 10 user whatever version you have installed. If the pg_ctl command in the third step gives an error after running it in \bin directory, then try running it in \data directory. After the above process re-run the installer.
I know it is not the the solution but installing 32 bit of Postgres, worked for me
I had the same problem when trying to install PostgreSQL 9.6.2 on a Windows 7 32 bit machine,but i got solution,first just uninstall the installed postgres,then delete the postgres folder from 'c' drive,delete the entry from temp file which resides in "C:\Users\AppData\Local\Temp".Then again installed postgres 9.6.2 that installed successfully.
Had this same problem trying to install on my company computer (PC running Windows 7). If you are not admin on your computer, you need to install it within your personal "User" folder (not in the "Program Files" folder(s) at the root).
If you still can't access Postgres:
Once you'd installed it under your "User" folder, use the 'Run' program and type in "services.msc" and hit enter. In the window that pops up, go down to your postgres installation, right-click and go to "properties". In the "Log On" tab, select "Local System account" then go back to the "General" tab and click "Start". It should boot after that.
After this, I was able to run "pgAdmin" and access the database (after entering the password I used during installation).
I had the same problem today when installing postgres 9.6.19 on windows 10.
Solution: Neither the installation path nor the windows path variable may contain a blank! Near to the end of the installer log file (found in wondows %temp% dir with a name like bitrock_installer_16156.log) i found:
Script stderr: "\UnxUtils\usr\local\wbin\";"C:\Program" kann
syntaktisch an dieser Stelle nicht verarbeitet werden.
where the installation directory i set as well as my windows %PATH% variable contained
C:\Program Files\
Workaround:
open a command prompt as administrator and type:
set path=C:\WINDOWS\system32
PostgreSQL-9.6.10-1-win64-bigsql.exe
And then of course choose a path not containing a blank.
That did it for me.
I encountered an issue where a username with a space in it on windows fails the postgres installation.
To test:
Reinstalled windows 10 home (restored)
Made a user account without the space
Postgres installed successfully
Very frustrating...
check the services: if any folder there postgres related stop it, and change to disable mode.
check regedit: HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER -> software -> remove postgres folder if exists.
In system environment variable: TEMP path location, remove the TEMP folder for both user and system. and Rename the TEMP to TEMP1 or something..
In system environment variable: remove path for postgres if it exists.
Now change the location of postgres.exe file to another drive.
Restart the system
Then Run postgres.exe
create a new installation directory for postgres and put /data outside.
the easiest way i solve this was:
1.- uninstall if you have already installed
2.- delete all files with failed instalations
3.- start windows in secure mode
4.- run installer in secure mode (it pops a warning but ignore) and restart
and that's it when restarted the service was running ok and everything works fine