MySQL 을 설치한 후 별도의 설정을 하지 않으면 초기 패스워드(암호) 는 비어있게 된다. 이 경우 localhost의 root 접근에 암호를 걸어주어야한다. 순서는 다음과 같다.
$ mysql -u root
mysql> use mysql;
mysql> select host,user,authentication_string from user;
mysql> alter user 'root'@'localhost' identified with mysql_native_password by 'new_password_you_want';
만약 외부에서 들어오는 계정을 생성할 필요가 있다면
mysql> create user 'root'@'192.168.0.100' identified with mysql_native_password by 'new_password_you_want';