What host are you specifying when you're connecting to the db? Server IP or localhost?
Could you install MySQL Workbench? https://www.mysql.com/products/workbench/
Try and connect to your DB server from your local machine and see if you can.
Can you just use bootstrap as your base? It has tons of stuff just built in like that and makes it much easier for people who aren't good at frontend type stuff. Specifically for responsive tables https://getbootstrap.com/docs/4.0/content/tables/#responsive-tables