This was a bit surprising to me. I've set a root password in cloud sql setting for remote connection and was expecting that the same password will be required for connections via local socket too, but that's not the case.

It only connects if the password is empty and user is root.