# Problem with installation - not allowed to connect to this MySQL server

**URL:** <https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140>\
**Category:** Help me!\
**Tags:** setup\
**Created:** [March 22, 2021, 12:13pm UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140 "2021-03-22T12:13:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarinaLevy](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/marinalevy/32/1827_2.png) [@MarinaLevy](https://community.forestadmin.com/u/MarinaLevy)\
**Post date:** [March 22, 2021, 12:13pm UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/1 "2021-03-22T12:13:20Z")

</div>

Dear all,  
Somehow, I have problems with installation  
I’m getting : Host ‘MY\_IP’ is not allowed to connect to this MySQL server.

The MySQL Server version: 5.7.33-0ubuntu0.18.04.1 (Ubuntu). As “Host” I’ve inserted the IP of my ubuntu vistual server.  
What should I do for successful installation?

Thank you in advance,  
Marina

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [March 22, 2021, 1:31pm UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/2 "2021-03-22T13:31:49Z")

</div>

Hello @MarinaLevy,

Thanks for your message and welcome to our community! 🙌

Are you able to connect to the database from another tool (for instance any MySQL client)?  
That could help us to know if there is a problem with the Forest Admin tool or if it comes from the “host” you’re referring.

Thanks.

---

<div class="post-metadata">

**Author:** ![MarinaLevy](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/marinalevy/32/1827_2.png) [@MarinaLevy](https://community.forestadmin.com/u/MarinaLevy)\
**Post date:** [March 24, 2021, 6:46am UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/3 "2021-03-24T06:46:49Z")

</div>

Thank you for the response!  
I able to connect to database via console (putty), using command "mysql -uroot -p -h127.0.0.1; " or “mysql -u root -p”  
Also I can connect to database using phpmyadmin.  
Thank you in advance!  
Marina

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [March 24, 2021, 8:05am UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/4 "2021-03-24T08:05:18Z")

</div>

Hello @MarinaLevy,

Are you able to connect to the MySQL server from the same machine than the one on which the agent is running?

It looks like a configuration issue on MySQL. You can limit ip addresses from which each user is authorized to log into MySQL when you defined an account on this system.

Can you please run the following command on MYSQL: `SELECT User, Host FROM mysql.user; ` and check that the user that you are trying to use is correctly associated with the ip address of the machine you are running the agent on?

Thanks.

---

<div class="post-metadata">

**Author:** ![MarinaLevy](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/marinalevy/32/1827_2.png) [@MarinaLevy](https://community.forestadmin.com/u/MarinaLevy)\
**Post date:** [March 24, 2021, 8:27am UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/5 "2021-03-24T08:27:40Z")

</div>

Thank you for such quick response!  
I did the query that you’ve asked for:  
±-----------------±----------+  
| User | Host |  
±-----------------±----------+  
| debian-sys-maint | localhost |  
| mysql.session | localhost |  
| mysql.sys | localhost |  
| phpmyadmin | localhost |  
| qa | localhost |  
| root | localhost |  
±-----------------±----------+

all users are associated with the localhost, not a IP  
What should I change?  
(I’m kind of newbie in this issue:)

Thank you in advance,

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [March 24, 2021, 8:58am UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/6 "2021-03-24T08:58:48Z")

</div>

Hello @MarinaLevy,

You have to create a specific user for your usage, that will have access to the DB you want to use for your application, coming from the IP address of your agent.

You can take a look at this answer on stack overflow on how to do it: [Create new user in MySQL and give it full access to one database - Stack Overflow](https://stackoverflow.com/questions/1720244/create-new-user-in-mysql-and-give-it-full-access-to-one-database)

---

<div class="post-metadata">

**Author:** ![MarinaLevy](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/marinalevy/32/1827_2.png) [@MarinaLevy](https://community.forestadmin.com/u/MarinaLevy)\
**Post date:** [March 24, 2021, 12:01pm UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/7 "2021-03-24T12:01:44Z")

</div>

OK, thank you.  
I will create the user.  
Should I define the host as IP of the virtual server?

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [March 24, 2021, 12:10pm UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/8 "2021-03-24T12:10:09Z")

</div>

When you create a user with the query `CREATE USER 'user'@'hostname';`, the hostname part must be the host used by the agent to connect to the DB.

It can either be an IP address, a host name or `%` to accept all hosts.

If the agent runs on a virtual server which address is `10.0.0.8` you have to create a user with `CREATE USER 'user'@'10.0.0.8';` or `CREATE USER 'user'@'%';`

---

<div class="post-metadata">

**Author:** ![MarinaLevy](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/marinalevy/32/1827_2.png) [@MarinaLevy](https://community.forestadmin.com/u/MarinaLevy)\
**Post date:** [March 24, 2021, 12:32pm UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/9 "2021-03-24T12:32:18Z")

</div>

> [@GuillaumeGautreau](#):
>
> @‘%’

Thank you.  
I’ve created a user and, the privileges and run the docker instalation. Still cannt connect to database…

±-----------------±----------+  
| User | Host |  
±-----------------±----------+  
| ForestA | % |  
| debian-sys-maint | localhost |  
| mysql.session | localhost |  
| mysql.sys | localhost |  
| phpmyadmin | localhost |  
| qa | localhost |  
| root | localhost |  
±-----------------±----------+

Thank you in advance,  
Marina

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [March 24, 2021, 12:38pm UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/10 "2021-03-24T12:38:22Z")

</div>

Hello @MarinaLevy,

Do you have the same error? Can you paste the error message here?

---

<div class="post-metadata">

**Author:** ![MarinaLevy](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/marinalevy/32/1827_2.png) [@MarinaLevy](https://community.forestadmin.com/u/MarinaLevy)\
**Post date:** [March 24, 2021, 12:41pm UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/11 "2021-03-24T12:41:47Z")

</div>

✖ Connecting to your database

> Cannot connect to the database due to the following error:  
> SequelizeConnectionError: connect ETIMEDOUT

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [March 24, 2021, 12:52pm UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/12 "2021-03-24T12:52:10Z")

</div>

Do you have access to your DB:

- With the account `ForestA`
- On another machine that the server itself
- With another software, such as Mysql Workbench ?

Using putty is equivalent to login on the server itself, because you first connect through SSH and then launch commands on the server itself.

My guess now is that there is something preventing the server to listen to external connections. It may be a firewall or a config parameter on MySQL itself.

So you have to ensure that you can connect to the DB from another machine (as it will be what you’ll need to do if you install the Forest Admin agent on another VM). Once it’ll work, you’ll be able to test with the agent again.

---

<div class="post-metadata">

**Author:** ![MarinaLevy](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/marinalevy/32/1827_2.png) [@MarinaLevy](https://community.forestadmin.com/u/MarinaLevy)\
**Post date:** [April 14, 2021, 9:02am UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/13 "2021-04-14T09:02:20Z")

</div>

> [@GuillaumeGautreau](#):
>
> Mysql Workbench

Thank you for your patience.  
I’ve opened all access to DB, but still have problem:  
**SequelizeConnectionError: Connections using insecure transport are prohibited while --require\_secure\_transport=ON.**

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [April 14, 2021, 2:33pm UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/14 "2021-04-14T14:33:16Z")

</div>

Hello @MarinaLevy 👋

This error seems to indicate that your mysql server is running with the `require_secure_transport=ON`, which means that the connection to your mysql server should only be made securely ([MySQL :: Security in MySQL :: 5.1 Configuring MySQL to Use Encrypted Connections](https://dev.mysql.com/doc/mysql-security-excerpt/8.0/en/using-encrypted-connections.html)).

This is not a “default” mysql configuration (MySQL allow SSL connection to be made by default, but does not _force_ the connection to be secure by default).

There are 2 solutions here:

- You can either remove this line (`require_secure_transport=ON`) from your mysql configuration if it’s not a requirement - but that will also allow insecure connection to be made (Which is ok on your local machine). See [this post](https://wordpress.stackexchange.com/questions/287549/how-to-resolve-connections-using-insecure-transport-are-prohibited-while-requi) for a how-to.
- You can also provide to the `new Sequelize()` creation the required parameters to force the connection to be made with specific parameters, as shown [here](https://stackoverflow.com/questions/45792547/sequelize-secure-connection-for-azure-mysql).

In your case, it seems like it’s the project generation that is failing. If that’s the case, solution 1 will be the best, at least until you fully created your project. Once it is created, you should be able to re-setup `require_secure_transport=ON` if that is a requirement for you.

Let me know if that helps 🙏

---

<div class="post-metadata">

**Author:** ![MarinaLevy](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/marinalevy/32/1827_2.png) [@MarinaLevy](https://community.forestadmin.com/u/MarinaLevy)\
**Post date:** [April 20, 2021, 12:13pm UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/15 "2021-04-20T12:13:20Z")

</div>

Finally, I’ve succeeded to finish that level in installation, but now it already like 2 hours in phase :"  
Waiting for your backend to run". In my forest admin app it says: “Please verify that your admin backend is correctly configured and running”.  
How can I fix it?  
Thank you in advance,  
Marina

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [April 20, 2021, 2:18pm UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/16 "2021-04-20T14:18:52Z")

</div>

Hi @MarinaLevy,

Is your admin backend (generated by lumber) running?  
Can you see any logs on it? Can you share them? 🙏

Thanks.

---

<div class="post-metadata">

**Author:** ![MarinaLevy](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/marinalevy/32/1827_2.png) [@MarinaLevy](https://community.forestadmin.com/u/MarinaLevy)\
**Post date:** [April 21, 2021, 10:04am UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/17 "2021-04-21T10:04:21Z")

</div>

Please explain what exactly should I show you.

---

<div class="post-metadata">

**Author:** ![anon90145840](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon90145840](https://community.forestadmin.com/u/anon90145840)\
**Post date:** [April 21, 2021, 12:30pm UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/18 "2021-04-21T12:30:29Z")

</div>

Hello @MarinaLevy

In the console where you start your Forest server, you might have some logs (including error ones)

Could you please check and share if there are any?

Also, in the network tab of the browser you should see some failing requests, can you please tell me which one is failing and with what error message.

Thank you

---

<div class="post-metadata">

**Author:** ![MarinaLevy](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/marinalevy/32/1827_2.png) [@MarinaLevy](https://community.forestadmin.com/u/MarinaLevy)\
**Post date:** [May 12, 2021, 5:54am UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/19 "2021-05-12T05:54:25Z")

</div>

OK, I’ve tried start from the beginning, now in the installation i have a error “connect econnrefused”.  
What should I do?

---

<div class="post-metadata">

**Author:** ![anon79585656](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@anon79585656](https://community.forestadmin.com/u/anon79585656)\
**Post date:** [May 12, 2021, 8:47am UTC](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140/20 "2021-05-12T08:47:47Z")

</div>

Hello @MarinaLevy, very sorry this take so long to solve.

Just to be sure I understand this thread and your issue:

- you are working under MS Windows (as you write about putty)
- you have a MySQL running with a Docker container, with a `ForestA` user
- you can access the database from you Windows host via MySQL Workbench
- you are installing a Forest agent within a second Docker container  
Is that right?

It so, you might want to ensure that the Docker container where you are installing Forest can connect to the container with your MySQL server.

Also, did you grant permissions to your `ForestA` user upon creation? With something like:

```javascript
GRANT ALL ON my_db.* TO 'new_user'@'localhost';

```

Could you also copy-paste the full log of your Forest installation?

Thank you for your patience

[Next page](https://community.forestadmin.com/t/problem-with-installation-not-allowed-to-connect-to-this-mysql-server/2140.md?page=2)
