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

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

Hello @MarinaLevy,

Thanks for your message and welcome to our community! :raised_hands:

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.

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

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.

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,

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

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

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'@'%';

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

Hello @MarinaLevy,

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

:heavy_multiplication_x: Connecting to your database

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

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.

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.

Hello @MarinaLevy :wave:

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).

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 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.

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 :pray:

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

Hi @MarinaLevy,

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

Thanks.