# Unable to connect to mysql dB

**URL:** <https://community.postman.com/t/unable-to-connect-to-mysql-db/8156>\
**Category:** Help Hub\
**Tags:** database-connectivit\
**Created:** [October 3, 2019, 1:23pm UTC](https://community.postman.com/t/unable-to-connect-to-mysql-db/8156 "2019-10-03T13:23:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jagtapprakash22](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@jagtapprakash22](https://community.postman.com/u/jagtapprakash22)\
**Post date:** [October 3, 2019, 1:23pm UTC](https://community.postman.com/t/unable-to-connect-to-mysql-db/8156/1 "2019-10-03T13:23:26Z")

</div>

Hi Team,

I’m unable to connect postman with MySQL server. as per given steps I had installed NPM MySQL packages.  
When I’m hitting below command getting error **"cache init failed during database reading xmsql"**

**Command : xmysql -h localhost -u mysqlUsername -p mysqlPassword -d databaseName**

I have username, password and dB name.  
I’m not sure what is localhost here? do I need to keep it as is or I will get hostname in cmd prompt after hitting command as “hostname”

Please assist.

**[Steps followed : [https://documenter.getpostman.com/view/5922408/RznJmGfn?version=latest#3ea22b15-8801-4817-a426-93878438702f](https://documenter.getpostman.com/view/5922408/RznJmGfn?version=latest#3ea22b15-8801-4817-a426-93878438702f) ]**

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [April 30, 2025, 2:22pm UTC](https://community.postman.com/t/unable-to-connect-to-mysql-db/8156/2 "2025-04-30T14:22:41Z")

</div>

Closed on April 30, 2025, 2:22pm UTC


