Adding user in mysql – Database Administrators Stack Exchange

Why i’m not able to add user with privileges in mysql. i’m running command grant all privileges on *.* to 'username'@localhost identified by 'strong password';. i’m keep getting error ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'strong password'' at line 1. I can add user separately and then assign him the privileges on db but i like to add user and assign privileges in single command. I’m running following mysql version

| version                  | 8.0.23-0ubuntu0.20.04.1       |
| version_comment          | (Ubuntu)                      |
| version_compile_machine  | x86_64                        |
| version_compile_os       | Linux                         |
| version_compile_zlib     | 1.2.11                        |