Say you created a blog application, and it's data is stored in a MySQL database. In your application configuration you set the data source name to myBlog
user root
password whatever
Now, when users start using your blog to access, post to, and comment on threads, etc... I am assuming they connect as root
through the application myblog
...
So... users connect to the application myBlog
who in turn connects to MySQL as user root
, using password whatever
--- it's not really the users that are connecting to MySQL, it's the application. Correct?
Is there not a security issue with this approach? Should I create a new username in MySQL for the application myBlog
with specific privileges and leave root
only for administering the database?