Hands-on Lab·MySQL
MySQL User Accounts
A new account can connect and can see almost nothing. That gap - authenticated but unauthorised - is the whole privilege model in one step, and ERROR 1044 is what it sounds like.
Users and Privileges Guide 16 of 45 Beginner
- OSUbuntu 26.04 LTS
- MySQL8.4.10-0ubuntu0.26.04.1
- Authcaching_sha2_password
- TimeAbout 12 min
caching_sha2_password is the 8.0+ default plugin. Older clients that only speak mysql_native_password need either an upgrade or an explicit plugin on the account.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| db-a01 | 192.168.0.81 | Ubuntu 26.04 LTS | Primary / Source / Replica Set Member 1 | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when a new account has to exist before it can do anything. This matters because CREATE USER makes an identity and nothing else - it can connect and see almost nothing, which is the correct place to start.
- creating an account, and reading the row it produced
- connecting as it, and seeing how little it can actually reach
- trying to use a database it has no grant on, and reading what the error names
Before you start
- MySQL running on db-a01 with
sudo mysqlaccess. - The
appdbdatabase from the schema-data track.
-
Create an account and read the row it produced
-
Connect as it, and see how little it can reach
-
Try to use a database it has no grant on