How to create mysql user on MySQL 8 with native password
Answers
-
Normally we create user using following:
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost'; FLUSH PRIVILEGES; EXIT;
To create user with native password:
CREATE USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost'; FLUSH PRIVILEGES; EXIT;
Or for existing user execute following:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; EXIT;
** If the user needs to write files into the file system
GRANT FILE ON *.* TO 'user'@'localhost'; FLUSH PRIVILEGES; EXIT;
0
Howdy, Stranger!
Categories
- 94 All Categories
- 20 VoIP
- 7 SIP
- 16 asterisk
- 44 Programming
- 1 Nodejs
- 4 javascript
- 19 PHP
- 8 Codeigniter
- 14 database
- 1 UI/UX
- 2 Flutter
- 28 OS
- 26 Linux
- 1 Virtualization
- 1 Android
- 1 Windows
- 2 legal