This wrapper use hardcoded data, you should avoid this. This doesn't meet best practices writing bash scripts but I leave this as it is because I use other methods to secure it.
My first recommendation is add separate mysql (read only) user for this purpose. It dramatically reduce possibly attack surface.
You can do this easily log in as root in your mysql instance and run:
mysql -u root -p