Use of hostname during User creation in MySQL 8.0

preview_player
Показать описание
why we are using 'localhost' here during user creation

as said MySQL is most secure DB

'localhost' here mention the current host

if we want to limit the access of user from other machine i.e. if want our customer to remotly login into this machine and want to limit to a particular IP then in this case we will do

e.g. the customer app ip is 172.168.56.10

so next time you want to create a user you can do

CREATE USER 'justin'@'172.168.56.10' IDENTIFIED WITH mysql_native_password BY 'Simple#123';

so now the connection from 172.168.56.10 server will only be able to connect remotly to our host

there are more permutation and combination in this w.r.t to the ip

PLEASE SUBSCRIBE AND LIKE AND SHARE. :)
Рекомендации по теме
visit shbcf.ru