# Unknown MySQL server host 'mysql'

**URL:** https://community.xibo.org.uk/t/unknown-mysql-server-host-mysql/31013
**Category:** CMS Installation
**Created:** [January 25, 2024, 1:17pm UTC](https://community.xibo.org.uk/t/unknown-mysql-server-host-mysql/31013 "2024-01-25T13:17:35Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![struebig](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/s/53a042/32.png) [@struebig](https://community.xibo.org.uk/u/struebig)
#### Post date: [January 29, 2024, 12:55pm UTC](https://community.xibo.org.uk/t/unknown-mysql-server-host-mysql/31013/4 "2024-01-29T12:55:19Z")

</div>

Ok, meanwhile I know much more of the problem.  
It is the same issue described here:

> [@Xibo CMS unable accessing mysql docker instance](https://community.xibo.org.uk/t/xibo-cms-unable-accessing-mysql-docker-instance/25027/2):
>
> Some additional detail: from the command line of the docker xibo-docker-239\_cms-web\_1, I tried the following commands: mysql -u cms -p -h mysql Enter password: ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (-3) So the issue can be reproduced inside both xibo-docker-239\_cms-web\_1 xibo-docker-2310\_cms-web\_1 However, performing command: mysql -u cms -p -h 127.0.0.1 inside the xibo-docker-239\_cms-db\_1, connection is successful, so the mysql instance inside that apps is working fine…

But I ran Version 2.3.x and after I did this mysql update:

> [@Upgrade MySQL for docker on windows](https://community.xibo.org.uk/t/upgrade-mysql-for-docker-on-windows/26727):
>
> To be completed by the original poster: CMS Version 3.0.0 Installation Method Docker Operating System Windows 10 HyperV Issue Please describe in detail the issue you are experiencing, including any errors shown in the Logs Upgraded from 2.3.8 to 3.0.0 (on the way to the latest) and I’m getting a lot of logs like this: Table mysql/innodb\_index\_stats has length mismatch in the column name table\_name. Please run mysql\_upgrade Tried to run mysql\_upgrade following the published instructio…

I got the same problem as before. The cms-web Container can’t connect the cms-db Container with the alias “mysql” but over the IP and even with “cms-db” the mysql connection from cms-web to cms-db work fine.

For me it looks like the docker-compose “links” flag don’t work. May this is the reason?  
“The `--link` flag is a legacy feature of Docker. It may eventually be removed.”

> **[Legacy container links](https://docs.docker.com/engine/network/links/)**
>
> Learn how to connect Docker containers together.

But how can I solve this?

---

_[View the full topic](https://community.xibo.org.uk/t/unknown-mysql-server-host-mysql/31013)._
