I have MySQL 5.7 installed and wanted to enable passwordless login for root.

So I executed

```
mysql> update mysql.user set plugin='' where User='root';
mysql> flush privileges;

```

Now I am not able to login anymore as root. Neither with the password nor without the password. I receive the following errors respectively:

```
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

```

I read about solutions using mysqld\_safe but I cannot use that since we are using systemd.

Any suggestions? Ideally without restarting mysqld but well ...

---

Also I tried

```
mysqladmin flush-privileges
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

```