cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Error connecting to the MySQL server

SOLVED
Highlighted

Error connecting to the MySQL server

Hi all!

I have set up an MySQLServer and a database with a table named tblAircrafts. I tried to create a service (respectively a query) to query

the whole table, but I am getting following error:

Error executing Service

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Unable to Invoke Service queryAircrafts on MySQLDatabase_Pilot : null, message from server: "Host 'GSPC130805.test-fuchs.com' is not allowed to connect to this MySQL Server"

I do not know why the host isnt allowed to connect to the server. I first thought it would be able to establish a connection because I have seen it in the "lastConnected" attribute. It established an Connection as I set up the MySQLConnection-Thing:

My query-Service looks like followed:

Maybe some of you have come across the same problem?

I would appreciate any help or advice you can give me. Thank you so much in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Error connecting to the MySQL server

Hi,

lastConnection property seems to be updated whenever you update configuration of your database thing, regardless of success or failure of a database connection.

I only have an experience with external oracle database but I assume you need to change the configuration of your MySQL server to allow connection from remote clients by a grant command like below;

>>grant all privileges on *.* to YOURUSER@'GSPC130805.test-fuchs.com' IDENTIFIED BY 'YOUR PASSWORD';

Please reference MySQL document and confirm the command.

View solution in original post

3 REPLIES 3
Highlighted

Re: Error connecting to the MySQL server

Hi,

lastConnection property seems to be updated whenever you update configuration of your database thing, regardless of success or failure of a database connection.

I only have an experience with external oracle database but I assume you need to change the configuration of your MySQL server to allow connection from remote clients by a grant command like below;

>>grant all privileges on *.* to YOURUSER@'GSPC130805.test-fuchs.com' IDENTIFIED BY 'YOUR PASSWORD';

Please reference MySQL document and confirm the command.

View solution in original post

Highlighted

Re: Error connecting to the MySQL server

Hi Theresa Lichtenberger​,

This is generic error. You will get it if you use any other client too.

Searched for the internet with "is not allowed to connect to this MySQL Server".

Got following Stack overflow link: Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server - Stack Overflow which suggests that there are some missing permissions. It also provides the commands to be run to grant the privileges.

You may also create a separate user who have all the permissions

After granting the requisite permission; please make sure that isConnected property is true. This will confirm that a successful connection has been made to the database.

Highlighted

Re: Error connecting to the MySQL server

It worked! Just had to create a new user and give him all permissions.

Thank you both!!

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!