Ionic 3 chat application using MySql as database

I want to create ionic 3 chat application using Mysql as database.
Here users have groups and personal chats.
Now i am able to load groups info from mysql using php as a scripting language such as groups name and other information.
Now the user click on a specific group then we need to go chat page and we need to load all previous message from MySql database.When the user sends a new message the message will be show on the screen real time and we need personal chat feature too.
So what technology we use to implement this.
we would be stick on Mysql as to implement this with
please help