Creating users

So far, you have used only the root user to connect to MySQL and execute statements. The root user should never be used while accessing MySQL, except for administrative tasks from localhost. You should create users, restrict the access, restrict the resource usage, and so on. For creating new users, you should have the CREATE USER privilege that will be discussed in the next section. During the initial set up, you can use the root user to create other users.

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.