0

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.

  • I removed the Microsoft SQL Server tag from your question since you mentioned mysql. – Dan Guzman Feb 9 at 11:47
  • Your assumption is probably not quite correct. The web interface lets you access the database. However, the web interface will have some form of authentication so that not just any application from anywhere can access the data. In your case the application would probably have to access the database with some form of authentication to ensure some level of security. – hot2use Feb 11 at 7:09
3

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.