Just like all e-commerce applications (like amazon) let you access the database and browse items without logging in or signing up, how can i do this with mysql database (without logging in with username and password)
closed as too broad by mustaccio, MDCCL, ypercubeᵀᴹ, hot2use, LowlyDBA Feb 11 at 13:49
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Applications often allow anonymous user access but relational databases should be accessed using a minimally privileged account as a best practice.
With a public web application, end users do not access the database directly but through the remote web server, middleware, or other service. The data access layer should then connect to the database using a minimally privileged account.
In MySQL, execute
CREATE USER and
GRANT to setup the service account. Use those credentials to connect to the database in the data access layer.