DEV Community

David Kanekanian
David Kanekanian

Posted on

Example 3 - Creating Multiple Database Users

In this example you will learn how to set up multiple users in your database and specify their access privileges to each of your tables. This example will be relatively short so it won't have an extra steps section. However, you should to apply what you learn to your past and future solutions.

By now, you know how to create a database with multiple tables. But each user should only be able access specific tables. For example, customers need to be able to view the products in stock, but only admins should be able to update the products data. MySQL lets you create users and set their privileges on each of your tables.

Jump to section:

Top comments (0)