To render MathJax code from MySQL, ensure the text is well formatted.
Query the database to load the code into your DOM.
I used an offline script but didn't render. When I used online CDN it rendered.
So, you can try using online CDN should you're using offline library and vice versa.
Also ensure the delimiters are properly observed.