The thing is; you can't connect Ionic to MySQL directly. No, there's no workaround, no magic involved, it's just not the way this is supposed to work. Ionic works on top of Angular and Angular is a frontend framework.
However, the way you should do it is that you basically create a (RESTful) API on your server side.
Most likely this will be made with PHP which will talk directly to MySQL and query it.
After you write your (RESTful) API (you'll need to invest some time to learn how to do it) then you can consume it through your services in Angular by using Angular's $resource object.
Sure, this is not a step by step answer, and it seems you're just starting in this area, so you have some learning to do on your part (REST, RESTful, $resource, services...), but I wish you good luck and if you'll have any more specific questions, don't hesitate to ask them.