Check out example codes for "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'privilleges to". It will help you in understanding the concepts better.
Code Example 1
GRANT ALL PRIVILEGES ON * . * TO 'wordpressuser'@'localhost';
Learn ReactJs, React Native from akashmittal.com