What is a MySQL user account?

Body

For most systems and applications, an account is just a username + password. In MySQL, an account is a username & hostname pair + password, and the password can be different for each user/host pair. Likewise, privileges can be different for each user/host pair.

This matters because your user name by itself does not automatically grant your access to anything. You must explicitly identify which host(s) a username is to be paired with, and change password, or grant/revoke access to databases based on the user/host pair.

The self-service web site tries to encapsulate some of this, but it cannot account for all possibilities or changes that you may make to your MySQL account(s). The onus is on you to be aware of how MySQL accounts are managed and verify that privileges and passwords are actually set the way you want.

Details

Details

Article ID: 123365
Created
Mon 12/28/20 5:50 PM
Modified
Thu 5/16/24 12:18 PM
Environment
MySQL

Related Articles