Unable to change root user unix_socket to mysql_native_password
As the manual says:


  The ALTER USER statement was introduced in MariaDB 10.2.0.


Since you're at 10.1, you'll need to reset the password using the old, dangerous method:

update mysql.user 
 set authentication_string=password('mypass'),  
 plugin='mysql_native_password' 
where user='root';