Platform:
MySQL is setup here as well.
I want to establish database connection with Qt and MySQ
You need to build the Qt/MySQL driver. See the documentation.