Jumat, 01 Mei 2020

Create a New User MySQL Command line

Let’s start by making a new user within the MySQL shell:

mysql>CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; #localhost only
or
mysql>CREATE USER 'newuser'@'%' IDENTIFIED BY 'password'; #any host

mysql>GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; #localhost only
or
mysql>GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'%'; #any host
mysql>FLUSH PRIVILEGES;

thanks

Tidak ada komentar:

Posting Komentar