# Orthanc using MySQL user with network

**URL:** https://discourse.orthanc-server.org/t/orthanc-using-mysql-user-with-network/2612
**Category:** Google Groups archive
**Created:** [September 6, 2021, 9:20pm UTC](https://discourse.orthanc-server.org/t/orthanc-using-mysql-user-with-network/2612 "2021-09-06T21:20:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![BNOEAFK](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/bnoeafk/32/1605_2.png) [@BNOEAFK](https://discourse.orthanc-server.org/u/BNOEAFK)
#### Post date: [September 6, 2021, 9:20pm UTC](https://discourse.orthanc-server.org/t/orthanc-using-mysql-user-with-network/2612/1 "2021-09-06T21:20:24Z")

</div>

I think there’s a problem with Orthanc’s use of the MySQL connection when a user has been configured on the MySQL server to connect from a specific network.

On our database server, we are restricted to using accounts from a known network (we’re in an ephemeral environment) and due to security policies, unable to use a global user account (“user”@“%”). Therefore, our only option is to configure a user with a network and subnet mask (“user”@“192.168.56.0/255.255.255.0”).

When Orthanc starts up, there’s an error connecting to the MySQL database as it appears that the network and subnet mask gets parsed incorrectly. The logging reads:

> unable to make a MySQL connection “user”@“”

Has anyone else seen this?

---

<div class="post-metadata">

### Author: ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)
#### Post date: [September 7, 2021, 6:02am UTC](https://discourse.orthanc-server.org/t/orthanc-using-mysql-user-with-network/2612/2 "2021-09-07T06:02:06Z")

</div>

Hello,

Such a feature has never been asked before.

Please provide us with a way to start MySQL in Docker using such a mask, so that the core development team of Orthanc can independently reproduce your setup on their computer:  
[https://hub.docker.com/\_/mysql](https://hub.docker.com/_/mysql)

[https://book.orthanc-server.com/users/support.html#discussing-a-minimal-working-example](https://book.orthanc-server.com/users/support.html#discussing-a-minimal-working-example)

Sébastien-

---

<div class="post-metadata">

### Author: ![BNOEAFK](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/bnoeafk/32/1605_2.png) [@BNOEAFK](https://discourse.orthanc-server.org/u/BNOEAFK)
#### Post date: [September 22, 2021, 6:07am UTC](https://discourse.orthanc-server.org/t/orthanc-using-mysql-user-with-network/2612/3 "2021-09-22T06:07:23Z")

</div>

I’m working on providing you this - but it’s not overly easy within Docker as you can’t ascertain which IP address Docker is going to be using and that is the core of the issue. It’s easier with multiple VMs as you can set up MySQL in a known network and configure it to only permit IPs from the same network.

Would providing an OVA with this set up, or utilizing VirtualBox / VMware be acceptable?

---

<div class="post-metadata">

### Author: ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)
#### Post date: [September 22, 2021, 6:36am UTC](https://discourse.orthanc-server.org/t/orthanc-using-mysql-user-with-network/2612/4 "2021-09-22T06:36:13Z")

</div>

This would certainly be acceptable to provide a minimal working example.

However, I would highly suggest you to take advantage of technologies like Vagrant, that can automate the provisioning of multiple virtual machines without distributing several OVA:  
[https://en.wikipedia.org/wiki/Vagrant\_(software)](https://en.wikipedia.org/wiki/Vagrant_(software))

Sébastien-
