# Adminer not working with 'refused to connect' error on ubuntu 20.04

**URL:** https://community.localwp.com/t/adminer-not-working-with-refused-to-connect-error-on-ubuntu-20-04/26966
**Category:** Support
**Tags:** adminer, ubuntu
**Created:** [August 4, 2021, 10:28am UTC](https://community.localwp.com/t/adminer-not-working-with-refused-to-connect-error-on-ubuntu-20-04/26966 "2021-08-04T10:28:49Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![eimantas](https://avatars.discourse-cdn.com/v4/letter/e/5f9b8f/32.png) [@eimantas](https://community.localwp.com/u/eimantas)
#### Post date: [August 4, 2021, 10:28am UTC](https://community.localwp.com/t/adminer-not-working-with-refused-to-connect-error-on-ubuntu-20-04/26966/1 "2021-08-04T10:28:49Z")

</div>

> ### Issue Summary

> _One or two sentence summary of the issue._

Can not access database through adminer.

> #### Troubleshooting Questions

- Does this happen for all sites in Local, or just one in particular?  
All.

- Are you able to create a new, plain WordPress site in Local and access it in a Browser?  
Yes.

> #### Replication
> 
> Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!

Install local-6.1.0-linux.deb to Ubuntu 20.04  
Try to access “adminer”

> #### System Details

> - Which version of Local is being used?

I am using local-6.1.0-linux.deb

> - What Operating System (OS) and OS version is being used?
> - _For example: macOS Catalina or Windows 10 Professional_

I am using Ubuntu 20.04

> - Attach the Local Log. See this Community Forum post for instructions on how to do so:
> - [How do I retrieve Local’s Log?](https://localwp.com/community/t/how-do-i-retrieve-locals-log-file/3720)  
> [local-lightning.log](https://community.localwp.com/uploads/short-url/c1xRVso206RT8bcld2lBXMiHLvj.log) (176.5 KB)

Tried to fix the issue following these steps [Accessing database Issues - Support - Local Community](https://localwp.com/community/t/accessing-database-issues/16201) however, none of the steps help.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/2/2b9c075e2f18b9e1487d5fce2a0bb245f74982b1.png)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/3/31f9857dca6a3675a4ea50f3cb1b4acd238ef815.png)

---

<div class="post-metadata">

### Author: ![eimantas](https://avatars.discourse-cdn.com/v4/letter/e/5f9b8f/32.png) [@eimantas](https://community.localwp.com/u/eimantas)
#### Post date: [August 5, 2021, 6:21am UTC](https://community.localwp.com/t/adminer-not-working-with-refused-to-connect-error-on-ubuntu-20-04/26966/2 "2021-08-05T06:21:05Z")

</div>

It has been 20 hours with no reply.  
Should we consider this app as not supported and dump usage?

It is strange, that once I register I get a rep call (three times already) about services and so on. How come support forum is so dead?

---

<div class="post-metadata">

### Author: ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)
#### Post date: [August 5, 2021, 8:41pm UTC](https://community.localwp.com/t/adminer-not-working-with-refused-to-connect-error-on-ubuntu-20-04/26966/3 "2021-08-05T20:41:50Z")

</div>

Hey @eimantas, Welcome to the Local Community Forums and I’m sorry you haven’t had a reply within a timeframe that you were expecting! We’re always looking for active community members to help with these kinds of requests, so maybe that’s something you’d like to help with! 😃

Taking a look at your Local Log, I’m seeing an error like this:

```auto
{"thread":"main","class":"HostsFileService","error":{"killed":false,"code":126,"signal":null,"cmd":"cd \"/home/dev\"; export ELECTRON_RUN_AS_NODE=\"1\"; \"/usr/bin/pkexec\" --disable-internal-agent /bin/bash -c \"echo SUDOPROMPT; export ELECTRON_RUN_AS_NODE=\\\"1\\\";/opt/Local/local %%appPath%%/main/dns/workers/updateHostsFileWorker.js babor.local www.babor.local\""},"stdout":"","stderr":"Error executing command as another user: Request dismissed\n","exitCode":126,"level":"error","message":"Could not update hosts.","timestamp":"2021-08-03T09:09:03.158Z"}

```

That part of the error that looks like this: `Error executing command as another user: Request dismissed` means that for whatever reason, your computer’s user didn’t give Local the permission it needs to update the Hosts file. Given that Adminer is running on `localhost`, I don’t think that this would be a problem, but it hints at the fact that maybe a firewall or other security setting is in place and preventing the browser from accessing Adminer.

I’d recommend taking a closer look at any security settings for the computer and see if that port is being actively blocked.

---

<div class="post-metadata">

### Author: ![eimantas](https://avatars.discourse-cdn.com/v4/letter/e/5f9b8f/32.png) [@eimantas](https://community.localwp.com/u/eimantas)
#### Post date: [August 10, 2021, 8:13am UTC](https://community.localwp.com/t/adminer-not-working-with-refused-to-connect-error-on-ubuntu-20-04/26966/4 "2021-08-10T08:13:55Z")

</div>

Hi,  
I have given now the correct permissions for ‘local’ to edit the hosts file. It does edit it now, however, I am still unable to use adminer or find database anyother way.  
I am attaching local-lightning.log file. [local-lightning.log](https://community.localwp.com/uploads/short-url/nH8sxR2f3sx9O4Cvr4sNlwOhhhn.log) (218.3 KB)  
Any idea how can I fix this?

---

<div class="post-metadata">

### Author: ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)
#### Post date: [August 10, 2021, 4:51pm UTC](https://community.localwp.com/t/adminer-not-working-with-refused-to-connect-error-on-ubuntu-20-04/26966/5 "2021-08-10T16:51:11Z")

</div>

That’s great that the hosts file can be edited by Local now and thanks for that Local log!

When I reviewed the Local log, I’m not seeing anything specific related to why adminer wouldn’t be working.

When I took a closer look at that screenshot of the browser, it looks like it’s trying to access port `10000` on `localhost`.

That doesn’t seem right to me. Usually when you click the “Adminer” button, a new PHP process is spawned and is listening on a new port that’s oftentimes higher up.

Can you try a few other troubleshooting steps?

1. Create a new site

2. Click the “Adminer” button for that site

3. If you still get the connection refused error in the browser, open a terminal and run this command to see if any of those php processes actually exist:

Can you share what the output of that command is? If you do get some output from that command, you might also try accessing that port in a browser. Here’s a screenshot to help visualize the url to use:

 ![Image 2021-08-10 at 9.50.01 AM](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/3/3994cadeee3d711531fb6e99198a61279658cff7.png)

---

<div class="post-metadata">

### Author: ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)
#### Post date: [November 8, 2021, 4:51pm UTC](https://community.localwp.com/t/adminer-not-working-with-refused-to-connect-error-on-ubuntu-20-04/26966/6 "2021-11-08T16:51:15Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
