# Mattermost failed to ping db by linux

**URL:** <https://forum.mattermost.com/t/mattermost-failed-to-ping-db-by-linux/21605>\
**Category:** Troubleshooting\
**Created:** [November 27, 2024, 7:01am UTC](https://forum.mattermost.com/t/mattermost-failed-to-ping-db-by-linux/21605 "2024-11-27T07:01:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![choitjddn0311](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/choitjddn0311/32/8443_2.png) [@choitjddn0311](https://forum.mattermost.com/u/choitjddn0311)\
**Post date:** [November 27, 2024, 7:01am UTC](https://forum.mattermost.com/t/mattermost-failed-to-ping-db-by-linux/21605/1 "2024-11-27T07:01:17Z")

</div>

while setting mattermost on docker,  
i build the image and waiting build  
but that send to me a error log(failed to ping db)

 ![스크린샷 2024-11-27 155720](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/f/f2931537dcd74b7e20691eeb9a689ec8ab4ba840.png)  
what wrong?

my env: ubuntu:22.04  
mattermost download = on docker

---

<div class="post-metadata">

**Author:** ![choitjddn0311](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/choitjddn0311/32/8443_2.png) [@choitjddn0311](https://forum.mattermost.com/u/choitjddn0311)\
**Post date:** [November 27, 2024, 7:10am UTC](https://forum.mattermost.com/t/mattermost-failed-to-ping-db-by-linux/21605/3 "2024-11-27T07:10:30Z")

</div>

i check my docker ps and they r running.  
this is mattermost logs

 ![스크린샷 2024-11-27 160902](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/f/f73aa0eb8bc8e47dd188883f8a9c9eca79c5b6ca.png)  
it still send me a same log  
and they are on the same network

---

<div class="post-metadata">

**Author:** ![john.oliver](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.oliver/32/6436_2.png) [@john.oliver](https://forum.mattermost.com/u/john.oliver)\
**Post date:** [November 27, 2024, 5:24pm UTC](https://forum.mattermost.com/t/mattermost-failed-to-ping-db-by-linux/21605/4 "2024-11-27T17:24:17Z")

</div>

Just because the socket is open inside of the container doesn’t mean it’s reachable by anything outside of it. If you can’t use psql from the host or another OS or container to connect, Mattermost won’t be able to connect either. Speaking of which, support for MySQL is ending pretty quickly, I’d recommend migrating to Postgres ASAP. [Migration guidelines from MySQL to PostgreSQL - Mattermost documentation](https://docs.mattermost.com/deploy/postgres-migration.html)

---

<div class="post-metadata">

**Author:** ![choitjddn0311](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/choitjddn0311/32/8443_2.png) [@choitjddn0311](https://forum.mattermost.com/u/choitjddn0311)\
**Post date:** [November 28, 2024, 1:12am UTC](https://forum.mattermost.com/t/mattermost-failed-to-ping-db-by-linux/21605/5 "2024-11-28T01:12:50Z")

</div>

thank you for answers!  
so i should do migrating to psql?  
and on mattermost can’t use mysql?

---

<div class="post-metadata">

**Author:** ![Akito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/akito/32/4090_2.png) [@Akito](https://forum.mattermost.com/u/Akito)\
**Post date:** [November 28, 2024, 6:45pm UTC](https://forum.mattermost.com/t/mattermost-failed-to-ping-db-by-linux/21605/6 "2024-11-28T18:45:37Z")

</div>

`docker exec` inside the Mattermost container and try to connect to the PostgreSQL container via the mentioned port. If it does not work, they are not in the same network.

---

<div class="post-metadata">

**Author:** ![john.oliver](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.oliver/32/6436_2.png) [@john.oliver](https://forum.mattermost.com/u/john.oliver)\
**Post date:** [November 30, 2024, 2:42pm UTC](https://forum.mattermost.com/t/mattermost-failed-to-ping-db-by-linux/21605/8 "2024-11-30T14:42:11Z")

</div>

@choitjddn0311 yes, you will have to migrate to Postgres pretty quickly. It’ll be a hard requirement as of Mattermost v11, IIRC
