# Connecting to a new MySQL database

**URL:** <https://forum.inductiveautomation.com/t/connecting-to-a-new-mysql-database/75085>\
**Category:** Ignition\
**Created:** [June 15, 2023, 3:26pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-new-mysql-database/75085 "2023-06-15T15:26:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Shelor](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Matthew\_Shelor](https://forum.inductiveautomation.com/u/Matthew_Shelor)\
**Post date:** [June 15, 2023, 3:26pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-new-mysql-database/75085/1 "2023-06-15T15:26:23Z")

</div>

I am currently trying to connect to a MySQL database through connections on my ignition localhost. In the URL, I have place the computer's IP I am trying to connect to, the port number, and a database name of a database on the other computers MySQL. jdbc:mysql://(IP OF HOST I AM TRYING TO CONNECT TO -TAKEN OUT FOR SECURITY):3306/test\_db . When trying to connect, I get this error message : Cannot create PoolableConnectionFactory (null, message from server: "Host '(HOST NAME- I TOOK OUOT)' is not allowed to connect to this MySQL server"). Please provide any help that you may recommend on validating the connection.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 15, 2023, 3:53pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-new-mysql-database/75085/2 "2023-06-15T15:53:55Z")

</div>

Add the appropriate user/origin login information to that MySQL instance. By default, you only get a root user that can connect from localhost (not via any other IP address).

---

<div class="post-metadata">

**Author:** ![Matthew\_Shelor](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Matthew\_Shelor](https://forum.inductiveautomation.com/u/Matthew_Shelor)\
**Post date:** [June 15, 2023, 4:50pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-new-mysql-database/75085/3 "2023-06-15T16:50:58Z")

</div>

I tried this and changed the user and password in ignition. Still the same error message: cannot connect to MySQL database

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [June 15, 2023, 4:59pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-new-mysql-database/75085/4 "2023-06-15T16:59:27Z")

</div>

> is not allowed to connect to this MySQL server

You need to change the permissions on the MySQL side of things. MySQL is rejecting you. You need to say what user, from what ip address, is allowed to login.

If you do `SELECT Host, User, FROM mysql.user;` in your MySQL workbench what do you see?
